Commit f206eb67 authored by simonmar's avatar simonmar

[project @ 2001-11-13 13:38:02 by simonmar]

Remove unused ticks_since_timestamp.
parent a58d723a
/* ----------------------------------------------------------------------------- /* -----------------------------------------------------------------------------
* $Id: Itimer.c,v 1.23 2001/08/14 13:40:09 sewardj Exp $ * $Id: Itimer.c,v 1.24 2001/11/13 13:38:02 simonmar Exp $
* *
* (c) The GHC Team, 1995-1999 * (c) The GHC Team, 1995-1999
* *
...@@ -74,11 +74,6 @@ handle_tick(int unused STG_UNUSED) ...@@ -74,11 +74,6 @@ handle_tick(int unused STG_UNUSED)
handleProfTick(); handleProfTick();
#endif #endif
/* so we can get a rough indication of the current time at any point
* without having to call gettimeofday() (see Select.c):
*/
ticks_since_timestamp++;
if (RtsFlags.ConcFlags.ctxtSwitchTicks > 0) { if (RtsFlags.ConcFlags.ctxtSwitchTicks > 0) {
ticks_to_ctxt_switch--; ticks_to_ctxt_switch--;
if (ticks_to_ctxt_switch <= 0) { if (ticks_to_ctxt_switch <= 0) {
...@@ -147,7 +142,6 @@ initialize_virtual_timer(nat ms) ...@@ -147,7 +142,6 @@ initialize_virtual_timer(nat ms)
struct itimerval it; struct itimerval it;
timestamp = getourtimeofday(); timestamp = getourtimeofday();
ticks_since_timestamp = 0;
it.it_value.tv_sec = ms / 1000; it.it_value.tv_sec = ms / 1000;
it.it_value.tv_usec = 1000 * (ms - (1000 * it.it_value.tv_sec)); it.it_value.tv_usec = 1000 * (ms - (1000 * it.it_value.tv_sec));
...@@ -168,7 +162,6 @@ initialize_virtual_timer(nat ms) ...@@ -168,7 +162,6 @@ initialize_virtual_timer(nat ms)
timer_t tid; timer_t tid;
timestamp = getourtimeofday(); timestamp = getourtimeofday();
ticks_since_timestamp = 0;
se.sigev_notify = SIGEV_SIGNAL; se.sigev_notify = SIGEV_SIGNAL;
se.sigev_signo = SIGVTALRM; se.sigev_signo = SIGVTALRM;
......
/* ----------------------------------------------------------------------------- /* -----------------------------------------------------------------------------
* $Id: Schedule.h,v 1.23 2001/11/08 12:46:31 simonmar Exp $ * $Id: Schedule.h,v 1.24 2001/11/13 13:38:02 simonmar Exp $
* *
* (c) The GHC Team 1998-1999 * (c) The GHC Team 1998-1999
* *
...@@ -122,7 +122,6 @@ extern rtsBool interrupted; ...@@ -122,7 +122,6 @@ extern rtsBool interrupted;
/* In Select.c */ /* In Select.c */
extern nat timestamp; extern nat timestamp;
extern nat ticks_since_timestamp;
/* Free capability list. /* Free capability list.
* Locks required: sched_mutex. * Locks required: sched_mutex.
......
/* ----------------------------------------------------------------------------- /* -----------------------------------------------------------------------------
* $Id: Select.c,v 1.18 2001/10/31 10:34:29 simonmar Exp $ * $Id: Select.c,v 1.19 2001/11/13 13:38:02 simonmar Exp $
* *
* (c) The GHC Team 1995-1999 * (c) The GHC Team 1995-1999
* *
...@@ -32,12 +32,6 @@ ...@@ -32,12 +32,6 @@
/* last timestamp */ /* last timestamp */
nat timestamp = 0; nat timestamp = 0;
/* keep track of the number of ticks since we last called
* gettimeofday(), to avoid having to call it every time we need
* a timestamp.
*/
nat ticks_since_timestamp = 0;
/* There's a clever trick here to avoid problems when the time wraps /* There's a clever trick here to avoid problems when the time wraps
* around. Since our maximum delay is smaller than 31 bits of ticks * around. Since our maximum delay is smaller than 31 bits of ticks
* (it's actually 31 bits of microseconds), we can safely check * (it's actually 31 bits of microseconds), we can safely check
...@@ -114,7 +108,6 @@ awaitEvent(rtsBool wait) ...@@ -114,7 +108,6 @@ awaitEvent(rtsBool wait)
do { do {
ticks = timestamp = getourtimeofday(); ticks = timestamp = getourtimeofday();
ticks_since_timestamp = 0;
if (wakeUpSleepingThreads(ticks)) { if (wakeUpSleepingThreads(ticks)) {
return; return;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment