git.ucc.asn.au
/
tpg
/
acess2.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
689780b
)
Fixing kernel time handling
author
John Hodge
<
[email protected]
>
Tue, 24 Jan 2012 14:19:54 +0000
(22:19 +0800)
committer
John Hodge
<
[email protected]
>
Tue, 24 Jan 2012 14:19:54 +0000
(22:19 +0800)
Kernel/lib.c
patch
|
blob
|
history
diff --git
a/Kernel/lib.c
b/Kernel/lib.c
index
a3ad731
..
ca37433
100644
(file)
--- a/
Kernel/lib.c
+++ b/
Kernel/lib.c
@@
-802,7
+802,7
@@
Sint64 timestamp(int sec, int min, int hrs, int day, int month, int year)
stamp *= 3600*24;
stamp += UNIX_TO_2K;
stamp += sec;
- stamp += min
s
*60;
+ stamp += min*60;
stamp += hrs*3600;
return stamp * 1000;
@@
-812,7
+812,9
@@
void format_date(tTime TS, int *year, int *month, int *day, int *hrs, int *mins,
{
int is_leap = 0, i;
- inline Sint64 DivMod64(Sint64 N, Sint64 D, Sint64 *R)
+ auto Sint64 DivMod64(Sint64 N, Sint64 D, Sint64 *R);
+
+ Sint64 DivMod64(Sint64 N, Sint64 D, Sint64 *R)
{
int sign = (N < 0) != (D < 0);
if(N < 0) N = -N;
@@
-823,7
+825,7
@@
void format_date(tTime TS, int *year, int *month, int *day, int *hrs, int *mins,
return DivMod64U(N, D, (Uint64*)R);
}
- // Get
within-day
time
+ // Get time
// TODO: Leap-seconds?
{
Sint64 rem;
UCC
git Repository :: git.ucc.asn.au