/[gentoo-perl]/genlop/trunk/genlop
Gentoo

Diff of /genlop/trunk/genlop

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 166 Revision 167
330 330
331sub print_gtime() { 331sub print_gtime() {
332 if ($days > 0) { 332 if ($days > 0) {
333 print colored("$days", $COLORS{'green'}), " day"; 333 print colored("$days", $COLORS{'green'}), " day";
334 print "s" if ($days > 1); 334 print "s" if ($days > 1);
335 print ", ";
336 } 335 }
337 if ($hours > 0) { 336 if ($hours > 0) {
337 print ", " if ($days > 0);
338 print colored("$hours", $COLORS{'green'}), " hour"; 338 print colored("$hours", $COLORS{'green'}), " hour";
339 print "s" if ($hours > 1); 339 print "s" if ($hours > 1);
340 print ", "; 340 print ", ";
341 } 341 }
342 if ($mins > 0) { 342 if ($mins > 0) {
343 print ", " if ($days > 0 or $hours > 0);
343 print colored("$mins", $COLORS{'green'}), " minute"; 344 print colored("$mins", $COLORS{'green'}), " minute";
344 print "s" if ($mins > 1); 345 print "s" if ($mins > 1);
345 print " and " if ($secs > 0 and !$pretend_found);
346 } 346 }
347 if ($mins < 1 && $hours < 1 && $secs > 0 && $current_found) { 347 if ($mins < 1 && $hours < 1 && $days < 1 && $secs > 0 && $current_found) {
348 print colored("less than a minute", $COLORS{'green'}); 348 print colored("less than a minute", $COLORS{'green'});
349 } elsif ($mins < 1 && $hours < 1 && $secs > 0 && $pretend_found) { 349 } elsif ($mins < 1 && $hours < 1 && $days < 1 && $secs > 0 && $pretend_found) {
350 print colored("less than a minute", $COLORS{'green'}); 350 print colored("less than a minute", $COLORS{'green'});
351 } elsif ($secs > 0 && !$pretend_found) { 351 } elsif ($secs > 0 && !$pretend_found) {
352 print " and " if ($days > 0 or $hours > 0 or $mins > 0);
352 print colored("$secs", $COLORS{'green'}), " second"; 353 print colored("$secs", $COLORS{'green'}), " second";
353 print "s" if ($secs > 1); 354 print "s" if ($secs > 1);
354 } 355 }
355 print "."; 356 print ".";
356} 357}

Legend:
Removed from v.166  
changed lines
  Added in v.167

  ViewVC Help
Powered by ViewVC 1.1.20