提交 aa45ae70 编写于 作者: X xionglei6

add bootchart

Signed-off-by: Nxionglei6 <xionglei6@huawei.com>
上级 f8d59abc
...@@ -33,12 +33,12 @@ ...@@ -33,12 +33,12 @@
static BootchartCtrl *g_bootchartCtrl = NULL; static BootchartCtrl *g_bootchartCtrl = NULL;
static PluginInterface *g_pluginInterface = NULL; static PluginInterface *g_pluginInterface = NULL;
static uint64_t GetJiffies(void) static int64_t GetJiffies(void)
{ {
struct timespec time1 = {0}; struct timespec time1 = {0};
clock_gettime(CLOCK_MONOTONIC, &time1); clock_gettime(CLOCK_MONOTONIC, &time1);
uint64_t jiffies1 = (uint64_t)time1.tv_nsec / NANO_PRE_JIFFY; int64_t jiffies1 = (int64_t)time1.tv_nsec / NANO_PRE_JIFFY;
uint64_t jiffies2 = (uint64_t)time1.tv_sec * (1000000000 / NANO_PRE_JIFFY); // 1000000000 to nsec int64_t jiffies2 = (int64_t)time1.tv_sec * (1000000000 / NANO_PRE_JIFFY); // 1000000000 to nsec
return jiffies1 + jiffies2; return jiffies1 + jiffies2;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册