[FZH] [D] C库函数timer_create()参数问题

cheng chen freakrobot at acm.org
Fri May 13 15:15:55 UTC 2011


谢了Guannan Ma啊,我就想问个问题啊,谁怎么样,跟我没关系,跟电脑有关的知识我都感兴趣~

On Fri, May 13, 2011 at 12:18 AM, Guannan Ma <mythmgn at gmail.com> wrote:

> If u use the CLOCK_MONOTONIC clock, the timer will not be affected by
> a system time change.
> Google some code ex.
>
>
> 2011/5/11 Caius 'kaio' Chance <kaio at fedoraproject.org>:
> > 息怒息怒~
> >
> > 2011/5/10 microcai <microcai at fedoraproject.org>
> >
> >> 于 2011年05月10日 18:11, ajax he 写道:
> >> > microcai这样说不妥吧,对ACMer有偏见?
> >> 不是偏见,他们本质如此。
> >>
> >>
> >> >
> >> > 在 2011年5月10日 下午2:14,microcai <microcai at fedoraproject.org>写道:
> >> >
> >> >> 于 2011年05月08日 23:33, cheng chen 写道:
> >> >>> 我在使用c语言库函数timer_create()的时候
> >> >>>
> >> >>> 第一个参数clockid有这样4个选择,
> >> >>>
> >> >>>       CLOCK_REALTIME(墙上时间)
> >> >>>              A settable system-wide real-time clock.
> >> >>>
> >> >>>       CLOCK_MONOTONIC
> >> >>>              A nonsettable monotonically increasing clock that
> measures
> >> >> time
> >> >>> from
> >> >>>              some unspecified point in the past that does not change
> >> >> after
> >> >>> system
> >> >>>              startup.
> >> >>>
> >> >>>       CLOCK_PROCESS_CPUTIME_ID (since Linux 2.6.12)(该进程的CPU时间)
> >> >>>              A clock that measures (user and system) CPU time
> consumed
> >> by
> >> >>> (all of
> >> >>>              the threads in) the calling process.
> >> >>>
> >> >>>       CLOCK_THREAD_CPUTIME_ID (since Linux 2.6.12)(该线程的CPU时间)
> >> >>>              A clock that measures (user and system) CPU time
> consumed
> >> by
> >> >>> the
> >> >>>              calling thread.
> >> >>>
> >> >>> manual上说的很短,其他都能理解,唯一不理解第二个时钟的使用。能否请大家帮忙讲解一下,谢谢。
> >> >>>
> >> >>> --
> >> >>> Cheng(誠)
> >> >>>
> >> >>
> >> >> ACM 的人也有不懂的啊?! 不是很厉害的么?都北大毕业的研究生么?
> >> >> 不是号称只要算法厉害,对系统的理解都是浮云么?
> >> >> _______________________________________________
> >> >> Chinese mailing list
> >> >> Chinese at lists.fedoraproject.org
> >> >> https://admin.fedoraproject.org/mailman/listinfo/chinese
> >> >>
> >> >>
> >> >>
> >> >> _______________________________________________
> >> >> Chinese mailing list
> >> >> Chinese at lists.fedoraproject.org
> >> >> https://admin.fedoraproject.org/mailman/listinfo/chinese
> >>
> >> _______________________________________________
> >> Chinese mailing list
> >> Chinese at lists.fedoraproject.org
> >> https://admin.fedoraproject.org/mailman/listinfo/chinese
> >>
> >
> >
> >
> > --
> > Regards ☺ Caius 'kaio' Chance - Fedora Project Contributor
> > [Fedora] http://goo.gl/9WWWC | [IRC] kaio @ freenode | [Twitter] @K410 |
> > [Blog] kaio.net
> > _______________________________________________
> > Chinese mailing list
> > Chinese at lists.fedoraproject.org
> > https://admin.fedoraproject.org/mailman/listinfo/chinese
> >
> _______________________________________________
> Chinese mailing list
> Chinese at lists.fedoraproject.org
> https://admin.fedoraproject.org/mailman/listinfo/chinese
>



-- 
Cheng(誠)
_______________________________________________

My Page: http://freakrobot.blogbus.com/


More information about the Chinese mailing list