linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Question about gettimeofday
@ 2001-07-30 23:54 Subhash S
  2001-07-31 13:29 ` Chris Friesen
  0 siblings, 1 reply; 2+ messages in thread
From: Subhash S @ 2001-07-30 23:54 UTC (permalink / raw)
  To: linux-kernel

[-- Attachment #1: Type: text/plain, Size: 307 bytes --]

Hi All,

In my application I use gettimeofday very frequently, as it is system
call on linux it is expensive, where as on Solaris it is not so. Could
you please tell me how solaris is implemented the function gettimeofday.

Please reply directly to me as I am not there in the mailing list.

Thanks,
Subhash

[-- Attachment #2: Card for Subhash S --]
[-- Type: text/x-vcard, Size: 183 bytes --]

begin:vcard 
n:;Subhash
x-mozilla-html:FALSE
org:Oracle India;LINUX PERFORMANCE
adr:;;;;;;
version:2.1
email;internet:Subhash.sutrave@oracle.com
x-mozilla-cpt:;0
fn:Subhash
end:vcard

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Question about gettimeofday
  2001-07-30 23:54 Question about gettimeofday Subhash S
@ 2001-07-31 13:29 ` Chris Friesen
  0 siblings, 0 replies; 2+ messages in thread
From: Chris Friesen @ 2001-07-31 13:29 UTC (permalink / raw)
  To: subhash.sutrave; +Cc: linux-kernel

Subhash S wrote:
> 
> Hi All,
> 
> In my application I use gettimeofday very frequently, as it is system
> call on linux it is expensive, where as on Solaris it is not so. Could
> you please tell me how solaris is implemented the function gettimeofday.

While I can't tell you how Solaris implemented it, I can say that in general if
you want very frequent timing access you're probably better off using inline
assembly to get at some processor-specific timer.  On a 400Mhz G4, the
difference was about a microsecond for gettimeofday() vs about 25 nanoseconds
for the assembly code.


-- 
Chris Friesen                    | MailStop: 043/33/F10  
Nortel Networks                  | work: (613) 765-0557
3500 Carling Avenue              | fax:  (613) 765-2986
Nepean, ON K2H 8E9 Canada        | email: cfriesen@nortelnetworks.com

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2001-07-31 13:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-07-30 23:54 Question about gettimeofday Subhash S
2001-07-31 13:29 ` Chris Friesen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).