h = m = s = ss = 0;
}
+ if ( stopish_get_type( ) == STOPISH_TYPE_COUNTDOWN ) {
+ h = -h;
+ m = -m;
+ s = -s;
+ ss = -ss;
+ }
+ // countdown check
+ if ( stopish_get_type( ) == STOPISH_TYPE_COUNTDOWN &&
+ ( h == 0 && m == 0 && s == 0 && ss == 0 ) )
+ return NULL;
+
timeBuffer = malloc( 64 );
if ( timerPrecision == TIMER_PRECISION_MINUTE )
sprintf( timeBuffer, "%.02d:%.02d.%.1d",
- m, s, ss );
+ ( unsigned int ) m, ( unsigned int ) s,
+ ( unsigned int ) ss );
else
sprintf( timeBuffer, "%.02d:%.02d:%.02d.%.1d",
- h, m, s, ss );
+ ( unsigned int ) h, ( unsigned int ) m,
+ ( unsigned int ) s, ( unsigned int ) ss );
return timeBuffer;
}