4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
9 * Full author contact details are available in file CREDITS.
15 #include "support/signals.h"
21 * This class executes the callback when the timeout expires.
27 ONETIME, //< one-shot timer
28 CONTINUOUS //< repeating
30 /// Note that the c-tor is implemented in the GUI-specific frontends
31 Timeout(unsigned int msec, Type = ONETIME);
34 /// Is the timer running?
42 /// signal emitted on timer expiry
43 signal<void()> timeout;
46 /// set the timer type
47 Timeout & setType(Type t);
48 /// set the timeout value
49 Timeout & setTimeout(unsigned int msec);
53 Timeout(Timeout const &);
54 void operator=(Timeout const &);
59 /// one-shot or repeating
61 /// timeout value in milliseconds
62 unsigned int timeout_ms;
65 // Small Timer class useful for debugging and performance investigation.
78 std::string dateStr(char separator = 0) const;
80 std::string timeStr(char separator = 0) const;
82 std::string toStr() const;
84 static std::string currentToStr();