Chinaunix首页 | 论坛 | 博客
  • 博客访问: 409254
  • 博文数量: 101
  • 博客积分: 2207
  • 博客等级: 大尉
  • 技术积分: 2508
  • 用 户 组: 普通用户
  • 注册时间: 2011-04-19 20:45
文章分类

全部博文(101)

文章存档

2013年(15)

2012年(86)

我的朋友

分类: LINUX

2012-09-02 16:38:16


CLOCK_GETTIME(2)           Linux Programmer’s Manual          CLOCK_GETTIME(2)

NAME
       clock_gettime - Return the current timespec value of tp for the specified clock

SYNOPSIS
       long sys_clock_gettime (clockid_t which_clock, struct timespec *tp);

DESCRIPTION
       clock_gettime  returns  the  current  timespec  value  of tp for the specific clock, which_clock.  The values that clockid_t currently supports for
       POSIX.1b timers, as defined in include/linux/time.h, are:

       CLOCK_REALTIME
              Systemwide realtime clock.

       CLOCK_MONOTONIC
              Represents monotonic time. Cannot be set.

       CLOCK_PROCESS_CPUTIME_ID
              High resolution per-process timer.

       CLOCK_THREAD_CPUTIME_ID
              Thread-specific timer.

       CLOCK_REALTIME_HR
              High resolution version of CLOCK_REALTIME.

       CLOCK_MONOTONIC_HR
              High resolution version of CLOCK_MONOTONIC.

RETURN VALUE
       clock_gettime returns 0 on success; otherwise, it returns one of the errors listed in the "Errors" section.

ERRORS
       -EINVAL
              An invalid which_clock value was specified.

       -EFAULT
              Can not coy to tp value.

SEE ALSO
       clock_getres(2), clock_nanosleep(2), clock_settime(2)

AUTHOR
       Niki Rahimi

Linux 2.6                        2004-March-12                CLOCK_GETTIME(2)

阅读(1268) | 评论(0) | 转发(1) |
给主人留下些什么吧!~~