![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
C++
wenstory
这个作者很懒,什么都没留下…
展开
-
一道算法的面试题
原贴出处:http://community.csdn.net/Expert/topic/5114/5114349.xml?temp=.2586939据说做对第二题拿薪水1W不成问题 ,现在工资只有0.06w,做做看看////////////////////////////////////////////////////////////////////////////////////////原创 2006-11-02 21:38:00 · 735 阅读 · 0 评论 -
写log:取得系统时间
以下给出一段写log时非常有用的代码,取得系统的当前时间, 之前看到我的parter写服务器的log竟然没有写上时间,狂晕,symbian下写log就爽多了,自动加上时间的. char times[50];memset(times,/0,50);struct tm *local;time_t t;t=time(NULL);local=localtime(&t);sprintf(time原创 2007-05-05 10:36:00 · 784 阅读 · 0 评论 -
LINUX下取系统时间(毫秒)和计算程序运行时间
#include #include #include struct timeval tvpre, tvafter; gettimeofday(&tvpre, NULL);sleep(3); //这里是linux编程,这个sleep是秒为单位的 gettimeofday(&tvafter, NULL); ast_log(LOG_NOTICE,"prepaid_staff_log: test原创 2007-05-05 10:40:00 · 6542 阅读 · 1 评论