summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Göttsche <cgzones@googlemail.com>2024-04-06 20:30:22 +0200
committercgzones <cgzones@googlemail.com>2024-04-08 18:12:39 +0200
commit56d7622902c2eed2f9f3a86591881ad3cf96f73b (patch)
treeb88207156d8df03f8fa93d7544a65a8f732adf33
parent626db518b350bb9b68b27f8fb90d440efddc2d21 (diff)
Use uppercase floating point literals
-rw-r--r--linux/GPU.c6
-rw-r--r--linux/LibNl.c2
2 files changed, 4 insertions, 4 deletions
diff --git a/linux/GPU.c b/linux/GPU.c
index 37d5d7c4..a4af9207 100644
--- a/linux/GPU.c
+++ b/linux/GPU.c
@@ -87,7 +87,7 @@ void GPU_readProcessData(LinuxProcessTable* lpt, LinuxProcess* lp, openat_arg_t
/* check only if active in last check or last scan was more than 5s ago */
if (lp->gpu_activityMs != 0 && host->monotonicMs - lp->gpu_activityMs < 5000) {
- lp->gpu_percent = 0.0f;
+ lp->gpu_percent = 0.0F;
return;
}
lp->gpu_activityMs = host->monotonicMs;
@@ -222,11 +222,11 @@ void GPU_readProcessData(LinuxProcessTable* lpt, LinuxProcess* lp, openat_arg_t
gputimeDelta = saturatingSub(new_gpu_time, lp->gpu_time);
monotonicTimeDelta = host->monotonicMs - host->prevMonotonicMs;
- lp->gpu_percent = 100.0f * gputimeDelta / (1000 * 1000) / monotonicTimeDelta;
+ lp->gpu_percent = 100.0F * gputimeDelta / (1000 * 1000) / monotonicTimeDelta;
lp->gpu_activityMs = 0;
} else
- lp->gpu_percent = 0.0f;
+ lp->gpu_percent = 0.0F;
out:
diff --git a/linux/LibNl.c b/linux/LibNl.c
index a256ede2..ba1359f2 100644
--- a/linux/LibNl.c
+++ b/linux/LibNl.c
@@ -179,7 +179,7 @@ static int handleNetlinkMsg(struct nl_msg* nlmsg, void* linuxProcess) {
// The xxx_delay_total values wrap around on overflow.
// (Linux Kernel "Documentation/accounting/taskstats-struct.rst")
unsigned long long int timeDelta = stats.ac_etime * 1000 - lp->delay_read_time;
- #define DELTAPERC(x, y) (timeDelta ? MINIMUM((float)((x) - (y)) / timeDelta * 100.0f, 100.0f) : NAN)
+ #define DELTAPERC(x, y) (timeDelta ? MINIMUM((float)((x) - (y)) / timeDelta * 100.0F, 100.0F) : NAN)
lp->cpu_delay_percent = DELTAPERC(stats.cpu_delay_total, lp->cpu_delay_total);
lp->blkio_delay_percent = DELTAPERC(stats.blkio_delay_total, lp->blkio_delay_total);
lp->swapin_delay_percent = DELTAPERC(stats.swapin_delay_total, lp->swapin_delay_total);

© 2014-2024 Faster IT GmbH | imprint | privacy policy