Copyright | (c) 2012-2021 Amy de Buitléir |
---|---|
License | BSD-style |
Maintainer | amy@nualeargais.ie |
Stability | experimental |
Portability | portable |
Safe Haskell | None |
Language | Haskell2010 |
An internal simulation clock which persists between runs. This is a
simple counter, completely independent from any system clock or
hardware clock. The clock does not automatically advance, it only
advances when
is called. In this way, the Créatúr
framework will run consistently, treating all agents fairly,
regardless of current processor load. It also ensures that data
obtained from simulation runs on different machines with different
CPU performance can still be meaningfully compared.incTime
Documentation
A clock representing the time in a Créatúr universe.
It is used to schedule events and ensure that each agent gets its
fair share of the CPU.
This clock is entirely separate from the system clock.
It advances only when
is called.
This allows Créatúr to run without being affected by other
processes which might be using the CPU at the same time.incTime
currentTime :: StateT c IO Time Source #
The current time, measured in "ticks"
incTime :: StateT c IO () Source #
Advance the clock to the next "tick".
Instances
Clock PersistentCounter Source # | |
Defined in ALife.Creatur.Counter |