summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--FL/Fl_System_Driver.H4
-rw-r--r--src/Fl_System_Driver.cxx7
2 files changed, 9 insertions, 2 deletions
diff --git a/FL/Fl_System_Driver.H b/FL/Fl_System_Driver.H
index 8a67ead8e..469128206 100644
--- a/FL/Fl_System_Driver.H
+++ b/FL/Fl_System_Driver.H
@@ -211,8 +211,8 @@ public:
virtual void remove_fd(int);
// the default implementation of open_callback() may be enough
virtual void open_callback(void (*)(const char *));
- // get elapsed time since Jan 1st, 1970
- virtual void gettime(time_t *sec, int *usec) {}
+ // The default implementation may be enough.
+ virtual void gettime(time_t *sec, int *usec);
};
#endif // FL_SYSTEM_DRIVER_H
diff --git a/src/Fl_System_Driver.cxx b/src/Fl_System_Driver.cxx
index dc3c1e3b6..c396c9e2f 100644
--- a/src/Fl_System_Driver.cxx
+++ b/src/Fl_System_Driver.cxx
@@ -26,6 +26,7 @@
#include <stdarg.h>
#include <string.h>
#include "flstring.h"
+#include <time.h>
const int Fl_System_Driver::fl_NoValue = 0x0000;
const int Fl_System_Driver::fl_WidthValue = 0x0004;
@@ -438,6 +439,12 @@ FILE *Fl_System_Driver::fopen(const char* f, const char *mode) {
void Fl_System_Driver::open_callback(void (*)(const char *)) {
}
+// Get elapsed time since Jan 1st, 1970.
+void Fl_System_Driver::gettime(time_t *sec, int *usec) {
+ *sec = time(NULL);
+ *usec = 0;
+}
+
//
// End of "$Id$".
//