[Piglit] [PATCH] framework: Humanize time values in the HTML report

Dylan Baker baker.dylan.c at gmail.com
Fri Nov 15 08:35:58 PST 2013


On Friday, November 15, 2013 04:26:07 PM Damien Lespiau wrote:
> On Fri, Nov 15, 2013 at 08:11:07AM -0800, Dylan Baker wrote:
> > > +    if amount == 'None':
> > > +        return 'None'
> > 
> > the python idiom is 'if not amount: return None'
> 
> These are strings, not the built-in.

Doh, that's what I get for reviewing patches first thing in the morning :)

> 
> > on a more practicle note, why roll all of this instead of just using
> > datetime.timedelta?
> 
> Because it was giving me much more control on how I wanted to display
> the time, as you can see.

Yes, I guess what I'm really asking is since you've now dropped all times 
greater than hours is that format worth the extra code? IMHO HH:MM:SS:MS* is 
just as good as xMin, ySec, zMS, etc; when you consider that 
datetime.timedelta is provided by python, thus zero maintanence burden.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 490 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.freedesktop.org/archives/piglit/attachments/20131115/7a51e5d7/attachment.pgp>


More information about the Piglit mailing list