How to get the current time in milliseconds in C Programming?
2014-03-24 09:39
453 查看
http://stackoverflow.com/questions/8558625/how-to-get-the-current-time-in-milliseconds-in-c-programming #include<stdio.h> #include<time.h> int main() { clock_t t1, t2; t1 = clock(); int i; for(i = 0;i < 1000000 ;i++) { int x = 90; } t2 = clock(); float diff = (((float)t2 - (float)t1) / 1000000.0F ) * 1000; printf("%f",diff); return 0; }
相关文章推荐
- How to get current date time in SharePoint Site Time Zone
- How to get the Current Controller Name, Action, or ID in ASP.NET MVC
- iOS Programming 101: How To Get the User Location in iPhone App
- How to get the current epoch time
- How to get the query statement of LOV in Oracle Form
- how to get cwd(current working directory) in python?
- How to get and set the drawing order of layers in globe(获取并设置Globe图层的叠加次序:)
- How to Get the Length of File in C
- flex/in the datagrid,how to get the new value of cell in the datagrid after edit
- How to get the control inside the ControlTemplate/DataTemplate on run time.
- How to get the available RAM and the cpu usage in percents?
- [Tutor] how to change the current working directory path in ipython.
- How to Use the TimeDistributed Layer for Long Short-Term Memory Networks in Python 译文
- How to set the current user on the model instance in the admin:
- How to get the url of a page in OpenERP?
- [Yii Framework] How to get the current static page name?
- How to get the content of the 'identity' section in web.config
- PHP: How to Get the Current Page URL
- how to get the function back trace in php
- How to get control of your time and your life (Alan Lakein.)