Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?

Re: Find average for time(Hr:Min:Sec)

by swampyankee (Parson)
on Dec 29, 2009 at 19:33 UTC ( #814806=note: print w/replies, xml ) Need Help??

in reply to Find average for time(Hr:Min:Sec)

You've got an answer, with code, so I'm going to give you some generic advice.

When you're being asked to average or total anything, your first step will be to convert everything to a standard unit (for time, I'd pick seconds), do the arithmetic with that unit, and then convert it to something that is easier for people to read (I'd be happy with an answer like 85 531 seconds, but that's just me). Obviously, some error checking is required, including the obvious checks to make sure that the H:M:S times don't include nonsense, like 4:103:99

Information about American English usage here and here. Floating point issues? Please read this before posting. — emc

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://814806]
[LanX]: and the problem only occurs since we changed the emails to base64
[LanX]: my main problem will be to cnvince my colleagues that our productive code is broken oO ... so in the end I will just make a workaround :-/
LanX hates UTF8 for causing knots in his brain and stomach
[Corion]: LanX: Yes, that's the main problem - you have lots (and lots) of workarounds in various places and stages of the processing, and to clean that mess up requires action across the complete codebase. And it's almost impossible to do it piece-by-piece

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (11)
As of 2017-01-16 14:04 GMT
Find Nodes?
    Voting Booth?
    Do you watch meteor showers?

    Results (150 votes). Check out past polls.