From owner-freebsd-hackers Fri Feb 23 12:52:46 1996 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id MAA09308 for hackers-outgoing; Fri, 23 Feb 1996 12:52:46 -0800 (PST) Received: from mailgate.ericsson.se (mailgate.ericsson.se [130.100.2.2]) by freefall.freebsd.org (8.7.3/8.7.3) with SMTP id MAA09296 for ; Fri, 23 Feb 1996 12:52:43 -0800 (PST) Received: from sa.erisoft.se (epls01.sa.erisoft.se [150.132.128.1]) by mailgate.ericsson.se (8.6.11/1.0) with SMTP id VAA19670; Fri, 23 Feb 1996 21:52:15 +0100 Received: from sws021.sa.erisoft.se by sa.erisoft.se (4.1/SMI-4.1-ERIS0.99) id AA25025; Fri, 23 Feb 96 21:52:14 +0100 From: Mattias.Gronlund@sa.erisoft.se (Mattias Gronlund) Received: by sws021.sa.erisoft.se (5.x/client-1.3) id AA05767; Fri, 23 Feb 1996 21:51:32 +0100 Message-Id: <9602232051.AA05767@sws021.sa.erisoft.se> Subject: Re: iostat To: bde@zeta.org.au (Bruce Evans) Date: Fri, 23 Feb 1996 21:51:31 +0100 (MET) Cc: FreeBSD-hackers@FreeBSD.ORG In-Reply-To: <199602231921.GAA26638@godzilla.zeta.org.au> from "Bruce Evans" at Feb 24, 96 06:21:31 am X-Mailer: ELM [version 2.4 PL24] Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-hackers@FreeBSD.ORG Precedence: bulk > > >Because of the need for better time percision the implementation > >curently uses microtime to get the time, but this is'nt realy that > >good, because it is possible for it to go backward! So if someone > >think that this is something that could be usefull for FreeBSD I > >would love to rewrite it for a simple clock that only should be > >useful to get delta times from, but with high percisiton. > > Just fix microtime(). Hmm, I guess that I wasn't all clear what I wanted. The thing that I want is a timer that never ever can return a time before the time that it got last time it was called in one session (from the last time booted). One other thing that I whould like with it is that it should be fast to calculate timedeltas with, that would make it very good for all types ofprofiling in the kernel and it should could give a value for the time since boot needed to calculate some statistics. > I have seen the clock go backwards a couple of times recently: ... > I've never seen this on i486 systems. This does not look good, I have tried to understand the code in microtime.s but I have never been into x86 assembler so I didn't realy understand what the code at the pentium_microtime did but it seems on your description like that is where the "bug" is. > No time daemons or users running `date' or adjtime() were active. But there is some system where `date' and/or adjtime is active :-). > Bruce /Mattias --- Any opinions in this posting are my own and not those of my present or previous employers.