vperf/main.c
2021-07-18 08:35:48 +08:00

37 lines
624 B
C

/*
* main.c
* Copyright (C) 2021 light <light@lightdeMBP>
*
* Distributed under terms of the MIT license.
*/
#include<stdio.h>
#include"./include/test.h"
#include <stdlib.h>
#include <string.h>
#define MAX_LINE 1024
struct memGlobal {
unsigned int All;
float Useage;
unsigned int Free;
} memG;
struct cpuGlobal {
float Useage;
} cpuG;
struct process {
char Name[128];
unsigned id;
float cpu;
float mem;
} pList[1024];
int main()
{
updateMem(&memG.All, &memG.Free, &memG.Useage);
printf("mem: all %u free: %u usage: %f\n", memG.All, memG.Free, memG.Useage);
return 0;
}