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

Comparing BasiliskII/src/BeOS/timer_beos.cpp (file contents):
Revision 1.1 by cebix, 1999-10-03T14:16:25Z vs.
Revision 1.7 by cebix, 2001-07-06T17:36:07Z

# Line 1 | Line 1
1   /*
2   *  timer_beos.cpp - Time Manager emulation, BeOS specific stuff
3   *
4 < *  Basilisk II (C) 1997-1999 Christian Bauer
4 > *  Basilisk II (C) 1997-2001 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 21 | Line 21
21   #include <KernelKit.h>
22  
23   #include "sysdeps.h"
24 + #include "macos_util.h"
25   #include "timer.h"
26  
27   #define DEBUG 0
# Line 44 | Line 45 | void Microseconds(uint32 &hi, uint32 &lo
45   *  Return local date/time in Mac format (seconds since 1.1.1904)
46   */
47  
47 const uint32 TIME_OFFSET = 0x7c25cca0;  // Offset Mac->BeOS time in seconds
48
48   uint32 TimerDateTime(void)
49   {
50 <        time_t uct_now = time(NULL);
52 <        struct tm tm;
53 <        localtime_r(&uct_now, &tm);
54 <        time_t local_now = mktime(&tm);
55 <        return (uint32)local_now + TIME_OFFSET;
50 >        return TimeToMacTime(time(NULL));
51   }
52  
53  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines