]> granicus.if.org Git - sysstat/commitdiff
sar: Don't check if we are close enough to selected interval when
authorSebastien GODARD <sysstat@users.noreply.github.com>
Sat, 25 Apr 2020 07:35:38 +0000 (09:35 +0200)
committerSebastien GODARD <sysstat@users.noreply.github.com>
Sat, 25 Apr 2020 07:35:38 +0000 (09:35 +0200)
interval=1

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
sa_common.c

index a38dfd6adb24568c7469f6e2d568fc0cb0d8057d..0c1d9e227b2fb6249c2d7a56ae79cee2b20039ca 100644 (file)
@@ -614,7 +614,7 @@ char *get_devname(unsigned int major, unsigned int minor, int pretty)
  * @interval   Interval of time.
  *
  * RETURNS:
- * 1 if we are actually close enough to desired interval, 0 otherwise.
+ * TRUE if we are actually close enough to desired interval, FALSE otherwise.
  ***************************************************************************
 */
 int next_slice(unsigned long long uptime_ref, unsigned long long uptime,
@@ -639,6 +639,10 @@ int next_slice(unsigned long long uptime_ref, unsigned long long uptime,
 
        last_uptime = uptime;
 
+       if (interval == 1)
+               /* Smallest time interval: Always close enough to desired interval */
+               return TRUE;
+
        /*
         * A few notes about the "algorithm" used here to display selected entries
         * from the system activity file (option -f with -i flag):