以微秒精度获取CurrnetTime [英] Get CurrnetTime with microseconds precision

查看:76
本文介绍了以微秒精度获取CurrnetTime的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,





我在Google上搜索了很多,我找不到答案,如何获得精确到微秒的当前时间。





示例:HH:MM :: SS :: MMM :: Microseconds。



如果有人有任何想法或建议,请告诉我。



问候,

Ranjith

解决方案

Windows不支持带时间戳的微秒时间分辨率。高分辨率仅支持时间跨度(例如,通过性能计数器)。 Windows时间戳项目 [ ^ ]对可以实现的分辨率有很好的解释。


 DateTime.Now.ToString(HH :MM:ss :: ffffff)



参考:以微秒为单位的时间 [ ^ ]


Hi Everyone,


I have done lots of search in Google and i could not find the answer, how to get the current time with microseconds precision.


Example: HH:MM::SS::MMM::Microseconds.

Let me know,if anyone have idea or suggestions.

Regards,
Ranjith

解决方案

Windows does not support microsecond time resolution with time stamps. High resolutions are only supported for time spans (e.g. by the performance counter). The Windows Timestamp Project[^] has a very good explanation about the resolutions that can be achieved.


DateTime.Now.ToString("HH:MM:ss::ffffff")


Reference : Time in microseconds[^]


这篇关于以微秒精度获取CurrnetTime的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆