Under Linux kernel 2.6.35, getting current time(accuracy macrosenconds).
来源:互联网 发布:建站abc登陆 编辑:程序博客网 时间:2024/04/29 10:49
Kernel API function prototype:
#include <linux/time.h>struct timeval {__kernel_time_ttv_sec;/* seconds */__kernel_suseconds_ttv_usec;/* microseconds */};do_gettimeofday(struct timeval *tv)
Code:
unsigned long timeuse;struct timeval tv_start, tv_end;do_gettimeofday(&tv_start); /* do something */do_gettimeofday(&tv_end);timeuse = (tv_end.tv_sec - tv_start.tv_sec) * 1000;timeuse += (tv_end.tv_usec - tv_start.tv_usec) / 1000;pr_debug("timeuse: %lu ms\n", timeuse);
- Under Linux kernel 2.6.35, getting current time(accuracy macrosenconds).
- Getting the Current Date and Time
- linux kernel current宏
- linux kernel current宏
- linux kernel current宏
- linux kernel current宏
- Linux Kernel Source - current 宏
- < Linux Kernel > Measuring Time
- linux kernel time management
- debugging the linux kernel under ubuntu 11.04
- Compile Kernel 2.6 under Debian Sarge
- Button input interrupt under linux kernel 2.6.35.7 send message button event
- Button input interrupt under linux kernel 2.6.35.7 send message to touch screen
- Tutorial: Debugging Linux Kernel with GDB under VirtualBox
- Unable to Find Sources for Current Linux Kernel
- kernel time
- Groovy get current time
- android get current Time
- 整数拆分问题
- SQl数据库多表关系
- 有关StringBuilder 类
- epoll精髓
- 2012百度之星[G:聊天就是Repeat]
- Under Linux kernel 2.6.35, getting current time(accuracy macrosenconds).
- J:百度的新大厦
- 第十六周实验--任务1--涨工资--从文件salary.txt 中读入500 名工人的工资--学会ASCII文件的操作
- LaTeX使用--XeLaTeX入门基础(一)
- Tim Cook:苹果须向社交化转变 继续做最好的产品
- 驱动加载卸载
- DOS永久设置系统环境变量-WMIC
- 安全专家教您正确使用漏洞扫描工具
- tomcat启动失败:Failed creating java jvm.dll