Thea
Static Public Member Functions | List of all members
System Class Reference

Low-level system information and profiling functions. More...

#include <System.hpp>

Static Public Member Functions

static void beginCycleCount (uint64 &cycle_count)
 Begin a timing operation. More...
 
static intx concurrency ()
 Get the hardware concurrency (approximate number of thread contexts). More...
 
static void endCycleCount (uint64 &cycle_count)
 End a timing operation. More...
 
static Endianness endianness ()
 Get the machine endianness. More...
 
static void sleep (intx ms)
 Pause the current thread for a given number of milliseconds. More...
 
static double time ()
 The actual time (measured in seconds since Jan 1 1970 midnight). More...
 

Detailed Description

Low-level system information and profiling functions.

Definition at line 27 of file System.hpp.

Member Function Documentation

void beginCycleCount ( uint64 &  cycle_count)
static

Begin a timing operation.

To count the number of cycles a given operation takes:

  uint64 count;
  System::beginCycleCount(count);
  ...
  System::endCycleCount(count);
  // count now contains the cycle count for the intervening operation.
See also
endCycleCount()

Definition at line 188 of file System.cpp.

intx concurrency ( )
static

Get the hardware concurrency (approximate number of thread contexts).

Definition at line 32 of file System.cpp.

void endCycleCount ( uint64 &  cycle_count)
static

End a timing operation.

See also
beginCycleCount()

Definition at line 194 of file System.cpp.

static Endianness endianness ( )
static

Get the machine endianness.

Definition at line 34 of file System.hpp.

void sleep ( intx  ms)
static

Pause the current thread for a given number of milliseconds.

Definition at line 42 of file System.cpp.

double time ( )
static

The actual time (measured in seconds since Jan 1 1970 midnight).

Adjusted for local timezone and daylight savings time. This is as accurate and fast as getCycleCount().

Definition at line 111 of file System.cpp.


The documentation for this class was generated from the following files: