My Space
My Tasks/Projects
Current
Marked
Projects I Involved
New Task
New Project
My Jottings & Pics
Marked
New Jotting
New Pictures
Events I Attend
New Event
Calendar
My Opportunities
Post New...
Group
Hot Group
Group List
Create Group Space
Community
Classified
Tags
Journal
Search
Wanted
My Contacts
Contacts' Updates
Who visits me?
My Favorites
Login
Register
Select Language
-------------
English
Simplified Chinese
gaston feng
IT & Internet
>
Software
驱动程序中的时间计量
gaston feng
| May 10, 2008 12:09:31 AM
#include<linux/time.h>
static struct timeval first_tick;
do_gettimeofday(&first_tick);
unsigned long set_ev_time(void) {
struct timeval now;
do_gettimeofday(&now);
return (now.tv_sec -first_tick.tv_sec )*1000 +
(now.tv_usec-first_tick.tv_usec)/1000;
}
用户程序中将do_gettimeofday(&now);替换成gettimeofday(&now,NULL);
Comment:
(no reply)
To post your comment, Please login first.