将 64 位十六进制转换为纳秒时间戳 [英] Convert 64-bit Hex to nanoseconds timestamps
本文介绍了将 64 位十六进制转换为纳秒时间戳的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有以 64 位十六进制表示的时间戳.有没有办法将其转换为纳秒时间戳?(最好在 C++ 中)
I have timestamps that are represented in 64-bit hex. Is there a way to convert it to nanosecond timestamps? (preferably in c++)
推荐答案
找到了!
我使用 std::hex 将十六进制值转换为 long,这反过来又给了我纳秒精度.
I used std::hex to convert a hex value to long, which in turn gives me the nanosecond precision.
这篇关于将 64 位十六进制转换为纳秒时间戳的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文