mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Chris Wedgwood <chris@cybernet.co.nz>
To: Colin Plumb <colin@nyx.net>, tytso@MIT.EDU
Cc: andrejp@luz.fe.uni-lj.si, linux-kernel@vger.rutgers.edu
Subject: Re: GPS Leap Second Scheduled!
Date: Thu, 10 Sep 1998 11:55:03 +1200	[thread overview]
Message-ID: <19980910115503.A24728@caffeine.ix.net.nz> (raw)
In-Reply-To: <19980910114515.A20254@caffeine.ix.net.nz>; from Chris Wedgwood on Thu, Sep 10, 1998 at 11:45:15AM +1200

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

On Thu, Sep 10, 1998 at 11:45:15AM +1200, Chris Wedgwood wrote:

> The attached code on a PPro 200 gives me results of 2 usecs, using a
> P.II 300 and SYSENTER semantics, you can probably get this to less
> that 1usec.

Crap... here it is.



-cw

[-- Attachment #2: tv-test.c --]
[-- Type: text/plain, Size: 438 bytes --]

#include <sys/time.h>
#include <unistd.h>
#include <stdio.h>

int	main()
{
	struct timeval	t1,t2,t3,t4;
	
	do{
		/* warm caches */
		gettimeofday(&t1,NULL);
		gettimeofday(&t2,NULL);
		gettimeofday(&t3,NULL);
		gettimeofday(&t4,NULL);

		gettimeofday(&t3,NULL);
		gettimeofday(&t4,NULL);
	}while(t3.tv_sec != t4.tv_sec); /* yuk */

	printf("%d usecs difference!\n",(int)(t4.tv_usec - t3.tv_usec));
	
	
	return	0;
}
                       

  reply	other threads:[~1998-09-09 23:35 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-09-09 20:13 Colin Plumb
1998-09-09 23:45 ` Chris Wedgwood
1998-09-09 23:55   ` Chris Wedgwood [this message]
1998-09-10  8:36   ` Rogier Wolff
1998-09-10 17:05     ` Oliver Xymoron
1998-09-10 22:02       ` Ryan Moore
     [not found] <19980914165757.A17479@tantalophile.demon.co.uk>
     [not found] ` <199809150603.XAA29073@cesium.transmeta.com>
     [not found]   ` <19980915100729.02790@albireo.ucw.cz>
     [not found]     ` <35FF1838.6E247F0C@his.com>
1998-09-17 11:51       ` Jan Echternach
  -- strict thread matches above, loose matches on Subject: below --
1998-09-11 22:49 Ethan O'Connor
     [not found] <no.id>
1998-09-10  6:34 ` Jamie Lokier
1998-09-11  6:18   ` Michael Shields
     [not found] <299BBE59294E@rkdvmks1.ngate.uni-regensburg.de>
     [not found] ` <98090822315400.00819@soda>
1998-09-09  0:59   ` H. Peter Anvin
1998-09-09  8:00     ` Chris Wedgwood
     [not found]       ` <199809092149.RAA06993@hilfy.ece.cmu.edu>
1998-09-10  1:37         ` H. Peter Anvin
1998-09-10 15:05           ` Theodore Y. Ts'o
1998-09-12 19:57           ` Feuer
1998-09-09 16:35   ` David Lang
1998-09-09  4:46 Colin Plumb
1998-09-09 19:08 ` Theodore Y. Ts'o

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=19980910115503.A24728@caffeine.ix.net.nz \
    --to=chris@cybernet.co.nz \
    --cc=andrejp@luz.fe.uni-lj.si \
    --cc=colin@nyx.net \
    --cc=linux-kernel@vger.rutgers.edu \
    --cc=tytso@MIT.EDU \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®