Hugintrunk  0.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Namespaces | Macros | Typedefs | Functions
Utils.h File Reference
#include <sys/time.h>
Include dependency graph for Utils.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

 utils
 

Macros

#define TIMETRACE(TEXT, CODE)
 

Typedefs

typedef struct timeval utils::os_TIME
 

Functions

void utils::os_GetTime (os_TIME *time)
 
int utils::os_TimeDiff (os_TIME *time1, os_TIME *time2)
 
unsigned long long utils::getTotalMemory ()
 returns the total memory in byte More...
 
unsigned int utils::GetPhysicalCPUCount ()
 return the number of physical cpu cores More...
 

Macro Definition Documentation

#define TIMETRACE (   TEXT,
  CODE 
)
Value:
{ std::ostringstream buf; utils::os_TIME t1,t2; utils::os_GetTime(&t1); CODE; \
utils::os_GetTime(&t2); buf << TEXT << " took " << utils::os_TimeDiff(&t2,&t1)/1000.0 << " seconds." << std::endl; std::cout << buf.str(); }
int os_TimeDiff(os_TIME *time1, os_TIME *time2)
Definition: Utils.h:57
struct timeval os_TIME
Definition: Utils.h:44
void os_GetTime(os_TIME *time)
Definition: Utils.h:47

Definition at line 32 of file Utils.h.

Referenced by main().