net_instaweb::MockTimer::Alarm Class Reference

#include "mock_timer.h"

List of all members.

Public Member Functions

 Alarm (int64 wakeup_time_us, Function *closure)
int64 wakeup_time_us () const
int Compare (const Alarm *that) const
Functionclosure ()
void CallRun ()
void CallCancel ()

Friends

class MockTimer

Detailed Description

Alarms provide a mechanism for tests employing mock timers to get notified when a certain mock-time passes. When a MockTimer::set_time_us is called (or any of the other functions that adjust time), time advances in phases broken up by outstanding alarms, so that the system is seen in a consistent state.


Member Function Documentation

int net_instaweb::MockTimer::Alarm::Compare ( const Alarm that  )  const

Compares two alarms, giving a total deterministic ordering based first, on wakeup time, and, in the event of two simultaneous alarms, the order in which the Alarm was added.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Generated on Tue May 29 16:34:12 2012 for Page Speed Optimization Libraries by  doxygen 1.6.3