projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[project @ 2004-11-10 03:20:31 by wolfgang]
[ghc-hetmet.git]
/
ghc
/
rts
/
Itimer.c
diff --git
a/ghc/rts/Itimer.c
b/ghc/rts/Itimer.c
index
7ba7051
..
50be88d
100644
(file)
--- a/
ghc/rts/Itimer.c
+++ b/
ghc/rts/Itimer.c
@@
-1,5
+1,4
@@
/* -----------------------------------------------------------------------------
/* -----------------------------------------------------------------------------
- * $Id: Itimer.c,v 1.37 2004/09/03 15:28:29 simonmar Exp $
*
* (c) The GHC Team, 1995-1999
*
*
* (c) The GHC Team, 1995-1999
*
@@
-197,12
+196,13
@@
unblock_vtalrm_signal(void)
/* gettimeofday() takes around 1us on our 500MHz PIII. Since we're
* only calling it 50 times/s, it shouldn't have any great impact.
*/
/* gettimeofday() takes around 1us on our 500MHz PIII. Since we're
* only calling it 50 times/s, it shouldn't have any great impact.
*/
-unsigned int
+nat
getourtimeofday(void)
{
struct timeval tv;
gettimeofday(&tv, (struct timezone *) NULL);
getourtimeofday(void)
{
struct timeval tv;
gettimeofday(&tv, (struct timezone *) NULL);
- return (tv.tv_sec * TICK_FREQUENCY +
- tv.tv_usec * TICK_FREQUENCY / 1000000);
+ // cast to nat because nat may be 64 bit when int is only 32 bit
+ return ((nat)tv.tv_sec * TICK_FREQUENCY +
+ (nat)tv.tv_usec * TICK_FREQUENCY / 1000000);
}
}