North State Framework in C#  V3.0.0
An object-oriented framework for implementing UML state machines.
Public Member Functions | Static Public Member Functions | Properties | List of all members
NSFOSTimer Class Reference

Represents an operating system timer that can be used to retrieve accurate time and block waiting for the next timeout. More...

Inheritance diagram for NSFOSTimer:
NSFTaggedObject NSFUniquelyNumberedObject INSFNamedObject

Public Member Functions

 NSFOSTimer (NSFString name)
 Creates an operating system timer. More...
 
void setNextTimeout (NSFTime timeout)
 Sets the next timeout. More...
 
void waitForNextTimeout ()
 Waits for the next tick period. More...
 
- Public Member Functions inherited from NSFTaggedObject
 NSFTaggedObject (NSFString name)
 Creates an object with a unique id and a name. More...
 
- Public Member Functions inherited from NSFUniquelyNumberedObject
 NSFUniquelyNumberedObject ()
 Creates a uniquely numbered object. More...
 
bool isSameObject (NSFUniquelyNumberedObject other)
 Checks if this object is the same as another object. More...
 

Static Public Member Functions

static NSFOSTimer create (NSFString name)
 Creates an operating system timer. More...
 
- Static Public Member Functions inherited from NSFUniquelyNumberedObject
static NSFId getNextUniqueId ()
 Gets the next unique id. More...
 

Properties

NSFTime CurrentTime [get]
 Gets the current time in milliseconds since the timer was created. More...
 
- Properties inherited from NSFTaggedObject
NSFString Name [get, set]
 
- Properties inherited from NSFUniquelyNumberedObject
NSFId UniqueId [get]
 Gets or sets the unique id of the object. More...
 
- Properties inherited from INSFNamedObject
NSFString Name [get]
 Gets the name of the object. More...
 

Detailed Description

Represents an operating system timer that can be used to retrieve accurate time and block waiting for the next timeout.

Constructor & Destructor Documentation

NSFOSTimer ( NSFString  name)

Creates an operating system timer.

Parameters
nameThe name of the timer.

Member Function Documentation

static NSFOSTimer create ( NSFString  name)
static

Creates an operating system timer.

Parameters
nameThe name of the timer.
Returns
The new timer.

This method is included for interface compatibility with other language implementations.

void setNextTimeout ( NSFTime  timeout)

Sets the next timeout.

Parameters
timeoutThe absolute time of the next timeout in milliseconds.

A thread blocked by the method waitForNextTimeTimeout() must unblock after the specified timeout.

void waitForNextTimeout ( )

Waits for the next tick period.

This method shall block the calling thread until the timeout specified by setNextTimeout(...).

Property Documentation

NSFTime CurrentTime
get

Gets the current time in milliseconds since the timer was created.

Returns
The current time in milliseconds.



Copyright 2004-2014, North State Software, LLC. All rights reserved.