ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/cebix/BasiliskII/src/Unix/timer_unix.cpp
(Generate patch)

Comparing BasiliskII/src/Unix/timer_unix.cpp (file contents):
Revision 1.3 by cebix, 1999-10-15T14:50:39Z vs.
Revision 1.8 by cebix, 2000-07-13T13:47:12Z

# Line 1 | Line 1
1   /*
2   *  timer_unix.cpp - Time Manager emulation, Unix specific stuff
3   *
4 < *  Basilisk II (C) 1997-1999 Christian Bauer
4 > *  Basilisk II (C) 1997-2000 Christian Bauer
5   *
6   *  This program is free software; you can redistribute it and/or modify
7   *  it under the terms of the GNU General Public License as published by
# Line 24 | Line 24
24   #define DEBUG 0
25   #include "debug.h"
26  
27 + // For NetBSD with broken pthreads headers
28 + #ifndef CLOCK_REALTIME
29 + #define CLOCK_REALTIME 0
30 + #endif
31 +
32  
33   /*
34   *  Return microseconds since boot (64 bit)
# Line 50 | Line 55 | void Microseconds(uint32 &hi, uint32 &lo
55   *  Return local date/time in Mac format (seconds since 1.1.1904)
56   */
57  
53 const uint32 TIME_OFFSET = 0x7c25b080;  // Offset Mac->Unix time in seconds
54
58   uint32 TimerDateTime(void)
59   {
60          time_t utc_now = time(NULL);
61   #if defined(__linux__) || defined(__SVR4)
62 <        long tz = timezone;
60 <        time_t local_now = uct_now - tz;
61 <        if (daylight)
62 <                local_now += 3600;
62 >        time_t local_now = utc_now - timezone;
63   #elif defined(__FreeBSD__) || defined(__NetBSD__)
64          time_t local_now = utc_now + localtime(&utc_now)->tm_gmtoff;
65   #else

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines