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:
Richard Frith-MacDonald 2008-05-30 11:05:28 +00:00
parent 31322e8116
commit 9a9c15a904

View file

@ -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]];
}