#include "pch_mm.h"
#include "global.hpp"
#include <time.h>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
Go to the source code of this file.
◆ _XOPEN_SOURCE
#define _XOPEN_SOURCE 700 |
◆ sys_browser()
void sys_browser |
( |
char * |
url | ) |
|
Definition at line 107 of file global.cpp.
108{
109 int c = 1000;
110 char buf[c];
111 memset(buf, 0, sizeof(char) * c);
112 snprintf(buf, c, "sensible-browser %s &", url);
113 system(buf);
114}
◆ sys_time()
uint64_t sys_time |
( |
void |
| ) |
|
Definition at line 56 of file global.cpp.
57{
58 struct timespec ts;
59 clock_gettime(CLOCK_MONOTONIC_RAW, &ts);
60 return ((uint64_t)ts.tv_sec * 1000000000 + ts.tv_nsec) - sys_time_start;
61}
◆ sys_time_init()
void sys_time_init |
( |
void |
| ) |
|
Definition at line 63 of file global.cpp.
64{
65 struct timespec ts;
66 clock_gettime(CLOCK_MONOTONIC_RAW, &ts);
67 sys_time_start = (uint64_t)ts.tv_sec * 1000000000 + ts.tv_nsec;
68}
◆ keys
◆ killme
◆ mickey_x
◆ mickey_y
◆ mouse
char mouse[8] = { 0,0,0,0,0,0,0,0 } |
◆ mouse_x
◆ mouse_y
◆ sys_dpi
◆ sys_height
◆ sys_ticksecond
uint64_t sys_ticksecond = 1000000000 |
◆ sys_width
◆ vid_height
◆ vid_width