annotate include/core/time.h @ 166:54c5d80a737e
dep/animia: add libutil method
I changed the "linux" method to be "proc", because it isn't exactly Linux specific
this commit also has some changes to the x11 stuff:
instead of enumerating over only top-level windows, we iterate over ALL of them
this is because many X11 apps actually use multiple windows
for some reason, I still can't get it to work with VLC, but it picks up Firefox...
| author |
paper@DavesDouble.local |
| date |
Sun, 19 Nov 2023 04:21:56 -0500 |
| parents |
c69230dc2b5d |
| children |
862d0d8619f6 |
| rev |
line source |
|
9
|
1 #ifndef __core__time_h
|
|
|
2 #define __core__time_h
|
|
85
|
3
|
|
9
|
4 #include <cstdint>
|
|
|
5 #include <string>
|
|
|
6 namespace Time {
|
|
|
7
|
|
|
8 class Duration {
|
|
|
9 public:
|
|
|
10 Duration(int64_t l);
|
|
|
11 int64_t InSeconds();
|
|
|
12 int64_t InMinutes();
|
|
|
13 int64_t InHours();
|
|
|
14 int64_t InDays();
|
|
|
15 std::string AsRelativeString();
|
|
|
16
|
|
|
17 private:
|
|
|
18 int64_t length;
|
|
|
19 };
|
|
|
20
|
|
|
21 int64_t GetSystemTime();
|
|
|
22
|
|
85
|
23 }; // namespace Time
|
|
|
24
|
|
9
|
25 #endif // __core__time_h |