Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C Programming > minimum time slice get in linux/unix

Reply
Thread Tools

minimum time slice get in linux/unix

 
 
Wei Wang (weiwang1)
Guest
Posts: n/a
 
      06-30-2003

Functions such as "gettimeofday" gives the time. How fine the
result is ? It probably is not as fine as 1 microsecond.
I use a test code on redhat linux 7.3, it gives approximately
3 microsecond, is it too good ? I know windows system is far
coarser.


Wei

 
Reply With Quote
 
 
 
 
Jack Klein
Guest
Posts: n/a
 
      07-01-2003
On Mon, 30 Jun 2003 15:25:57 -0500, "Wei Wang (weiwang1)"
<(E-Mail Removed)> wrote in comp.lang.c:

>
> Functions such as "gettimeofday" gives the time. How fine the


Not in standard C, the topic of comp.lang.c, it doesn't, because there
is no function named gettimeofday(). The only function in standard C
that returns time is deliberately hidden by giving it the confusing
name time().

> result is ? It probably is not as fine as 1 microsecond.
> I use a test code on redhat linux 7.3, it gives approximately
> 3 microsecond, is it too good ? I know windows system is far
> coarser.
>
>
> Wei


Not only is comp.lang.c not a good place for this question,
gnu.gcc.help is not either, because gcc is basically a system
independent compiler that uses system-supplied libraries on most
platforms, and does not control many characteristics of the underlying
operating system.

There is no one universal "linux/unix" time slice. If you have a
Linux specific question you should ask in
news:comp.os.linux.development.apps. If you have a question about a
specific version of UNIX you should hunt up a newsgroup for that
specific version, or perhaps ask about a specific version in
news:comp.unix.programmer.

There is no one answer that applies to Linux and all UNIX or UNIX-like
systems.

--
Jack Klein
Home: http://JK-Technology.Com
FAQs for
comp.lang.c http://www.eskimo.com/~scs/C-faq/top.html
comp.lang.c++ http://www.parashift.com/c++-faq-lite/
alt.comp.lang.learn.c-c++ ftp://snurse-l.org/pub/acllc-c++/faq
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to get a wrap aound slice of numpy array danfan1981@yahoo.com Python 2 04-20-2007 11:48 PM
How do I get a slice of a string held in a tuple? Lorenzo Thurman Python 9 04-09-2007 02:14 AM
Is time.time() < time.time() always true? flamesrock Python 8 11-24-2006 06:51 AM
minimum cache time Joseph ASP .Net 2 06-09-2004 04:41 PM
How to get a slice of INTEGER type out? walala VHDL 1 09-05-2003 08:04 PM



Advertisments