Deleted Added
sdiff udiff text old ( 9171:ae88ecf37145 ) new ( 9206:f6483789d23a )
full compact
1/*
2 * Copyright (c) 2012 Mark D. Hill and David A. Wood
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met: redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer;

--- 37 unchanged lines hidden (view full) ---

46Consumer::scheduleEventAbsolute(Time timeAbs)
47{
48 scheduleEventAbsolute(g_system_ptr, timeAbs);
49}
50
51void
52Consumer::scheduleEventAbsolute(EventManager *em, Time timeAbs)
53{
54 Tick evt_time = timeAbs * g_system_ptr->getClock();
55 if (!alreadyScheduled(evt_time)) {
56 // This wakeup is not redundant
57 ConsumerEvent *evt = new ConsumerEvent(this);
58 assert(timeAbs > g_system_ptr->getTime());
59
60 em->schedule(evt, evt_time);
61 insertScheduledWakeupTime(evt_time);
62 }
63}