Tekkotsu Homepage
Demos
Overview
Downloads
Dev. Resources
Reference
Credits

get_time.cc File Reference

Implementation of get_time(), a simple way to get the current time since boot in milliseconds. More...

#include "get_time.h"
#include <iostream>
#include <sys/time.h>
Include dependency graph for get_time.cc:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  project_get_time
 

If we're running locally, these will let users in "project" space control time for simulation.


Functions

unsigned int project_get_time::default_get_time_callback ()
 provides default implementation of get_time_callback -- starts a TimeET instance on the first call and then returns its age thereafter

Variables

unsigned int project_get_time::simulation_time = -1U
 This will default to -1, which signals get_time() to use get_time_callback. Any other value will cause that value to be used instead.
unsigned int(* project_get_time::get_time_callback )() = &default_get_time_callback
 This by default will return the time in milliseconds since the first call was made. Note this is a function pointer, so you can reassign it to your own implementation!
float(* project_get_time::get_timeScale_callback )() = NULL
 You can reassign this to your own implementation if you might play games with time control. For instance, the simulator can assign a function which simply returns SharedGlobals::timeScale. By default this is NULL, which indicates to getTimeScale that it should use the default implementation. Note that this is a slightly different usage paradigm than get_time_callback(), which is assumed to always be non-NULL (at least, unless you assign a value to simulation_time...).

Detailed Description

Implementation of get_time(), a simple way to get the current time since boot in milliseconds.

Author:
ejt (Creator)

Definition in file get_time.cc.


Tekkotsu v5.1CVS
Generated Mon May 9 04:58:56 2016 by Doxygen 1.6.3