summaryrefslogtreecommitdiff
path: root/source/api_wrappers/linux/OS.h
blob: ad1e7af26ecad68be3e878bc7279cc059a1d1d56 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
/*******************************************************************************
 * Copyright (C) ST-Ericsson SA 2011
 * License terms: 3-clause BSD license
 ******************************************************************************/

#ifndef _OS_H
#define _OS_H
#include <sys/time.h>
#include <stdio.h>
#include <stdlib.h>
#include "Types.h"

#include "CWaitableObject.h"

class OS
{
public:
    OS();
    virtual ~OS();

    static void Sleep(DWORD dwMilliseconds);
    static time_t GetSystemTimeInMs();

    static DWORD GetErrorCode() {
        return OS::ErrorCode;
    }
    static void SetErrorCode(DWORD dwErrorCode) {
        OS::ErrorCode = dwErrorCode;
    }

    static timespec GetAbsoluteTime(DWORD dwTimeout);
private:

    static DWORD ErrorCode;
};
#endif /* _OS_H */