blob: 7a86900d8ba540c88ffa423b9114565c92defbdd [file] [log] [blame]
Lingfeng Yangbcb607f2020-10-28 15:56:23 -07001#include "base/CpuTime.h"
2
Lingfeng Yangc02cb032020-10-26 14:21:25 -07003#include <string>
4
5namespace android {
6namespace base {
7
8std::string getEnvironmentVariable(const std::string& key);
9void setEnvironmentVariable(const std::string& key, const std::string& value);
10bool isVerboseLogging();
11
12uint64_t getUnixTimeUs();
Lingfeng Yang3c944902020-10-28 11:56:43 -070013uint64_t getHighResTimeUs();
Lingfeng Yangc02cb032020-10-26 14:21:25 -070014
Lingfeng Yang81496dc2020-10-29 10:43:26 -070015uint64_t getUptimeMs();
16
Lingfeng Yangc02cb032020-10-26 14:21:25 -070017std::string getProgramDirectory();
18std::string getLauncherDirectory();
19
Lingfeng Yang0e6868f2020-11-03 12:32:59 -080020bool getFileSize(int fd, uint64_t* size);
Lingfeng Yang3c944902020-10-28 11:56:43 -070021
22void sleepMs(uint64_t ms);
Lingfeng Yangbfe3c722020-10-29 10:33:18 -070023void sleepUs(uint64_t us);
Lingfeng Yang3c944902020-10-28 11:56:43 -070024
Lingfeng Yangbcb607f2020-10-28 15:56:23 -070025CpuTime cpuTime();
26
Lingfeng Yangc9feed72020-11-05 10:18:12 -080027bool queryFileVersionInfo(const char* filename, int* major, int* minor, int* build1, int* build2);
28
Yilong Li85fc3812021-04-09 17:15:56 -070029int getCpuCoreCount();
30
Lingfeng Yangc02cb032020-10-26 14:21:25 -070031} // namespace base
32} // namespace android