cosapp.core.time

Classes

TimeManager(*args, **kwargs)

Observer pattern subject notifying its observers when time changes

TimeObserver([sign_in])

Abstract time observer.

UniversalClock(*args, **kwargs)

Unique (singleton) time manager

class cosapp.core.time.TimeManager(*args, **kwargs)[source]

Bases: Subject

Observer pattern subject notifying its observers when time changes

reset(t: Number = 0)[source]

Reset time to a chosen value, without notifying observers

property time: Number

Current simulation time

class cosapp.core.time.TimeObserver(sign_in=True)[source]

Bases: Observer

Abstract time observer. Concrete derived classes must implement abstract method ‘_update’.

observe()[source]

Sign in as observer of the universal time manager

observes() bool[source]

Bool: has object signed up as an observer?

property t: Number

Current simulation time - alias for time

property time: Number

Current simulation time

class cosapp.core.time.UniversalClock(*args, **kwargs)[source]

Bases: TimeManager

Unique (singleton) time manager