由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Unix版 - [转载] alarm, pause 又一问
相关主题
file descriptorPerl Q
Does Linux support thread?async-signal safe 问题
A Unix questionSocket programming help
what is the difference between pthread and thr_ ?a perl question
does Linux has real time timer?多次遇到这种问题:previous declaration of .....
multithread questionCan I get the CPU-time of a thread?
which shell is the best among csh, ksh, bsh?[转载] 写程序 通讯 的 API (IPC )
pthread_kill SIGINT SIG_DFL multithread[转载] Unix/Posix system programming training
相关话题的讨论汇总
话题: alarm话题: pause话题: 一问话题: function话题: any
进入Unix版参与讨论
1 (共1页)
a****s
发帖数: 47
1
【 以下文字转载自 Programming 讨论区 】
【 原文由 abatis 所发表 】
Any alarm function that has precision of microsecond?
I have to use alarm function, and it seems I cannot use
usleep or nanosleep, cause the document says not
to mixing them.
It didn't say don't mix up alarm and pause, but I wonder
if alarm and pause are mixed, some problem will arise?
j***y
发帖数: 87
2

you can try setitimer for BSD based (4.2 or later) system,
or settimer for POSIX based system. They have higher resolution
than alarm, although the accuracy may be machine-dependent.

【在 a****s 的大作中提到】
: 【 以下文字转载自 Programming 讨论区 】
: 【 原文由 abatis 所发表 】
: Any alarm function that has precision of microsecond?
: I have to use alarm function, and it seems I cannot use
: usleep or nanosleep, cause the document says not
: to mixing them.
: It didn't say don't mix up alarm and pause, but I wonder
: if alarm and pause are mixed, some problem will arise?

1 (共1页)
进入Unix版参与讨论
相关主题
[转载] Unix/Posix system programming trainingdoes Linux has real time timer?
how to check disk available using posix API?multithread question
Semaphores in Linux (转载)which shell is the best among csh, ksh, bsh?
若问aix系统可以在普通的非ibm机器上装吗?pthread_kill SIGINT SIG_DFL multithread
file descriptorPerl Q
Does Linux support thread?async-signal safe 问题
A Unix questionSocket programming help
what is the difference between pthread and thr_ ?a perl question
相关话题的讨论汇总
话题: alarm话题: pause话题: 一问话题: function话题: any