1
/* vim:tabstop=4:expandtab:shiftwidth=4
5
* Copyright (c) 2005, FixXxeR (avelar@gmail.com)
6
* based from Timer.cc (vdesk project) by MrChuoi <mrchuoi at yahoo dot com>
9
* Redistribution and use in source and binary forms, with or without
10
* modification, are permitted provided that the following conditions are met:
12
* Redistributions of source code must retain the above copyright
13
* notice, this list of conditions and the following disclaimer.
15
* Redistributions in binary form must reproduce the above copyright
16
* notice, this list of conditions and the following disclaimer in the
17
* documentation and/or other materials provided with the distribution.
19
* Neither the name of the <ORGANIZATION> nor the names of its
20
* contributors may be used to endorse or promote products derived from
21
* this software without specific prior written permission.
23
* (See the included file COPYING / BSD )
30
#include "XDesktopContainer.h"
38
void SetDelay( long d ) { delay = d; start = time(0); }
39
long GetDelay( long n ) { return start + delay - n; }
40
void Finish() { start = delay;}
41
long Reset() { start = time(0); return delay; }
43
virtual bool IsOneShot() { return true; }
44
virtual void OnTime() = 0;
49
static vector<TimerControl*> items;
50
AbstractContainer * container;
53
Timer(AbstractContainer * con);
56
static void Add( TimerControl *t, long d );
57
static void Remove( TimerControl *t );