mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-07-17 07:12:08 +08:00
4012d181e1
date: 2024-03-17T10:14:38 master commit: 7e9a909e0e57ecb31df4c87c5b9a06b1204fd034
26 lines
437 B
C++
26 lines
437 B
C++
|
|
#include <sys/resource.h>
|
|
|
|
#include "common/ratekeeper.h"
|
|
#include "common/util.h"
|
|
#include "system/proclogd/proclog.h"
|
|
|
|
ExitHandler do_exit;
|
|
|
|
int main(int argc, char **argv) {
|
|
setpriority(PRIO_PROCESS, 0, -15);
|
|
|
|
RateKeeper rk("proclogd", 0.5);
|
|
PubMaster publisher({"procLog"});
|
|
|
|
while (!do_exit) {
|
|
MessageBuilder msg;
|
|
buildProcLogMessage(msg);
|
|
publisher.send("procLog", msg);
|
|
|
|
rk.keepTime();
|
|
}
|
|
|
|
return 0;
|
|
}
|