add a missing section header table index conversion
[tangerine.git] / workbench / prefs / time / prefs.c
blobecfe600655dc5eff3c29c655e58ac1e4e1bc240c
1 /*
2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc:
6 Lang: English
7 */
9 /*********************************************************************************************/
11 #include "global.h"
12 #include <aros/macros.h>
14 #define DEBUG 0
15 #include <aros/debug.h>
17 #include <stdio.h>
18 #include <string.h>
19 #include <stdlib.h>
21 /*********************************************************************************************/
23 void InitPrefs(BOOL use, BOOL save)
25 struct timeval tv;
27 GetSysTime(&tv);
28 Amiga2Date(tv.tv_secs, &clockdata);
30 if (use || save) Cleanup(NULL);
33 /*********************************************************************************************/
35 BOOL UsePrefs(void)
37 ULONG secs;
39 secs = Date2Amiga(&clockdata);
41 TimerIO->tr_node.io_Command = TR_SETSYSTIME;
42 TimerIO->tr_time.tv_secs = secs;
43 TimerIO->tr_time.tv_micro = 0;
45 DoIO(&TimerIO->tr_node);
47 return TRUE;
50 /*********************************************************************************************/
52 BOOL SavePrefs(void)
54 return TRUE;
57 /*********************************************************************************************/
59 void RestorePrefs(void)
61 InitPrefs(FALSE, FALSE);
64 /*********************************************************************************************/