summaryrefslogtreecommitdiff
path: root/LibCore/CElapsedTimer.h
blob: b7aa84bfeec5a8a000eb93efbbefb74edfb408de (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#pragma once

#include <time.h>

class CElapsedTimer {
public:
    CElapsedTimer() { }

    bool is_valid() const { return m_valid; }
    void start();
    int elapsed() const;

private:
    bool m_valid { false };
    struct timeval m_start_time { 0, 0 };
};