JWM Source Documentation
Functions | Variables
timing.c File Reference

Timing functions. More...

#include "jwm.h"
#include "timing.h"

Go to the source code of this file.

Functions

void GetCurrentTime (TimeType *t)
 Get the current time in milliseconds since midnight 1970-01-01 UTC.
 
unsigned long GetTimeDifference (const TimeType *t1, const TimeType *t2)
 Get the absolute difference between two times in milliseconds.
 
const char * GetTimeString (const char *format, const char *zone)
 Get the current time.
 

Variables

static const unsigned long MAX_TIME_SECONDS = 60
 

Detailed Description

Timing functions.

Author
Joe Wingbermuehle
Date
2004-2006

Definition in file timing.c.

Function Documentation

void GetCurrentTime ( TimeType t)

Get the current time in milliseconds since midnight 1970-01-01 UTC.

Get the current time.

Definition at line 16 of file timing.c.

References TimeType::ms, and TimeType::seconds.

Referenced by EventLoop(), MoveClient(), ProcessClockMotionEvent(), ProcessMotionEvent(), ProcessPagerMotionEvent(), ProcessTaskMotionEvent(), Resize(), and Signal().

unsigned long GetTimeDifference ( const TimeType t1,
const TimeType t2 
)

Get the absolute difference between two times in milliseconds.

Get the difference between two times.

If the difference is larger than a MAX_TIME_SECONDS, then MAX_TIME_SECONDS will be returned. Note that the times must be normalized.

Definition at line 29 of file timing.c.

References JUNLIKELY, MAX_TIME_SECONDS, TimeType::ms, and TimeType::seconds.

Referenced by EventLoop(), MenuCallback(), Signal(), SignalClock(), SignalPager(), SignalTaskbar(), SignalTrayButton(), and UpdateDesktop().

const char* GetTimeString ( const char *  format,
const char *  zone 
)

Get the current time.

Get a time string.

Definition at line 57 of file timing.c.

Referenced by DrawClock(), and SignalClock().

Variable Documentation

const unsigned long MAX_TIME_SECONDS = 60
static

Definition at line 13 of file timing.c.

Referenced by GetTimeDifference().

joewing.net / Projects / JWM