Main Page | Class Hierarchy | Data Structures | Directories | File List | Data Fields | Related Pages

db_clock.c

00001 /*-
00002  * See the file LICENSE for redistribution information.
00003  *
00004  * Copyright (c) 2005
00005  *      Sleepycat Software.  All rights reserved.
00006  *
00007  * $Id: db_clock.c,v 1.2 2005/08/08 14:39:52 bostic Exp $
00008  */
00009 
00010 #include "db_config.h"
00011 #include "db_int.h"
00012 
00013 /*
00014  * __db_difftime --
00015  *
00016  * Compute the difference in seconds and microseconds of two timers.
00017  *
00018  * PUBLIC: void __db_difftime __P((u_int32_t, u_int32_t, u_int32_t, u_int32_t,
00019  * PUBLIC:    u_int32_t *, u_int32_t *));
00020  */
00021 void
00022 __db_difftime(ssec, esec, susec, eusec, secp, usecp)
00023         u_int32_t ssec, esec, susec, eusec, *secp, *usecp;
00024 {
00025         if ((*secp = esec - ssec) != 0 && eusec < susec) {
00026                 (*secp)--;
00027                 eusec += 1000000;
00028         }
00029         *usecp = eusec - susec;
00030 }

Generated on Sun Dec 25 12:14:17 2005 for Berkeley DB 4.4.16 by  doxygen 1.4.2