-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathos.h
22 lines (18 loc) · 801 Bytes
/
os.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
/*
os.h
(c) Richard Thrippleton
Licensing terms are in the 'LICENSE' file
If that file is not included with this source then permission is not given to use this source in any way whatsoever.
*/
#include <stdio.h>
class os //A module defining some things that are regrettably os specific
{
public:
static void init(); //Initialise anything os specific, such as signals
static void finish(); //OS level cleanup tasks
static FILE* openpersonal(const char* fnam,const char* flag); //Open up a file of given name from personal settings area, with given flags to fopen
static char* gettime(); //Get the current time and date as a string
static long getseed(); //Get a number suitable for a random number seed, usually from the clock
private:
static char tbuf[256]; //Time string buffer
};