A simple app to get run times from a thread

Just a quick app to test and demonstrate how to get run times from a
specific thread on FreeBSD.
This commit is contained in:
Harald Eilertsen 2025-06-20 13:21:43 +02:00
commit 45e6aebfbf
10 changed files with 366 additions and 0 deletions

16
sysctl_cpu_time.hpp Normal file
View file

@ -0,0 +1,16 @@
/*
* SPDX-FileCopyrightText: 2025 Eilertsens Kodeknekkeri
* SPDX-FileCopyrightText: 2025 The FreeBSD Foundation
* SPDX-FileContributor: Harald Eilertsen <haraldei@anduin.net>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#ifndef __SYSCTL_CPU_TIME_HPP
#define __SYSCTL_CPU_TIME_HPP
#include <pthread.h>
void sysctl_cpu_time(pthread_t thread, struct timeval * utime, struct timeval * stime);
#endif