mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-07-23 10:12:17 +08:00
c5825aed76
date: 2022-07-14T00:06:12 master commit: 5a7c2f90361e72e9c35e88abd2e11acdc4aba354
23 lines
390 B
C++
23 lines
390 B
C++
|
|
#include <sys/resource.h>
|
|
|
|
#include "common/util.h"
|
|
#include "system/proclogd/proclog.h"
|
|
|
|
ExitHandler do_exit;
|
|
|
|
int main(int argc, char **argv) {
|
|
setpriority(PRIO_PROCESS, 0, -15);
|
|
|
|
PubMaster publisher({"procLog"});
|
|
while (!do_exit) {
|
|
MessageBuilder msg;
|
|
buildProcLogMessage(msg);
|
|
publisher.send("procLog", msg);
|
|
|
|
util::sleep_for(2000); // 2 secs
|
|
}
|
|
|
|
return 0;
|
|
}
|