mirror of
https://github.com/gnustep/libs-performance.git
synced 2025-02-19 10:01:20 +00:00
tweak timestamps in notifications to be on minute boundary.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/performance/trunk@26587 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
31322e8116
commit
9a9c15a904
1 changed files with 9 additions and 5 deletions
|
@ -228,7 +228,7 @@ typedef struct {
|
|||
}
|
||||
if (my->notify == YES && my->last > 59)
|
||||
{
|
||||
if (info->min == MAXDURATION)
|
||||
if (info->min >= MAXDURATION)
|
||||
{
|
||||
info->min = -1.0;
|
||||
}
|
||||
|
@ -245,9 +245,13 @@ typedef struct {
|
|||
[NSNumber numberWithDouble: info->sum],
|
||||
GSThroughputTotalKey,
|
||||
[NSDate dateWithTimeIntervalSinceReferenceDate:
|
||||
base + my->last - 59],
|
||||
base + my->last - 60],
|
||||
GSThroughputTimeKey,
|
||||
nil]];
|
||||
if (info->min < 0.0)
|
||||
{
|
||||
info->min = MAXDURATION;
|
||||
}
|
||||
}
|
||||
if (my->minute++ == my->minutesPerPeriod - 1)
|
||||
{
|
||||
|
@ -319,7 +323,7 @@ typedef struct {
|
|||
[NSNumber numberWithUnsignedInt: info->cnt],
|
||||
GSThroughputCountKey,
|
||||
[NSDate dateWithTimeIntervalSinceReferenceDate:
|
||||
base + my->last - 59],
|
||||
base + my->last - 60],
|
||||
GSThroughputTimeKey,
|
||||
nil]];
|
||||
}
|
||||
|
@ -382,7 +386,7 @@ typedef struct {
|
|||
[NSNumber numberWithDouble: info->sum],
|
||||
GSThroughputTotalKey,
|
||||
[NSDate dateWithTimeIntervalSinceReferenceDate:
|
||||
base + my->last - 59],
|
||||
base + my->last - 60],
|
||||
GSThroughputTimeKey,
|
||||
nil]];
|
||||
}
|
||||
|
@ -404,7 +408,7 @@ typedef struct {
|
|||
[NSNumber numberWithUnsignedInt: info->cnt],
|
||||
GSThroughputCountKey,
|
||||
[NSDate dateWithTimeIntervalSinceReferenceDate:
|
||||
base + my->last - 59],
|
||||
base + my->last - 60],
|
||||
GSThroughputTimeKey,
|
||||
nil]];
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue