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 = g_system_ptr->clockPeriod() * timeAbs; |
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} |