diff --git a/cpu/6502/sys/clock.c b/cpu/6502/sys/clock.c
index bc9e572d9..cfa4a778a 100644
--- a/cpu/6502/sys/clock.c
+++ b/cpu/6502/sys/clock.c
@@ -30,14 +30,14 @@
*
* Author: Oliver Schmidt
*
- * $Id: clock.c,v 1.1 2007/12/15 00:14:19 oliverschmidt Exp $
+ * $Id: clock.c,v 1.2 2008/07/12 14:44:37 oliverschmidt Exp $
*/
#include
#include "contiki.h"
-/*-----------------------------------------------------------------------------------*/
+/*---------------------------------------------------------------------------*/
clock_time_t
clock_time(void)
{
@@ -53,4 +53,10 @@ clock_time(void)
* on the educated guess of CLK_TCK being an even value. */
return clock() / (CLK_TCK / CLOCK_CONF_SECOND);
}
-/*-----------------------------------------------------------------------------------*/
+/*---------------------------------------------------------------------------*/
+unsigned long
+clock_seconds(void)
+{
+ return clock() / CLK_TCK;
+}
+/*---------------------------------------------------------------------------*/
diff --git a/platform/apple2enh/sys/clock.c b/platform/apple2enh/sys/clock.c
index 8aa809ee6..ef169ae7f 100644
--- a/platform/apple2enh/sys/clock.c
+++ b/platform/apple2enh/sys/clock.c
@@ -30,7 +30,7 @@
*
* Author: Oliver Schmidt
*
- * $Id: clock.c,v 1.2 2007/12/16 13:11:46 oliverschmidt Exp $
+ * $Id: clock.c,v 1.3 2008/07/12 14:46:03 oliverschmidt Exp $
*/
#include
@@ -76,3 +76,9 @@ clock_time(void)
return time;
}
/*-----------------------------------------------------------------------------------*/
+unsigned long
+clock_seconds(void)
+{
+ return time / CLOCK_CONF_SECOND;
+}
+/*-----------------------------------------------------------------------------------*/