bugGNU Octave - Bugs: bug #50649, tic / toc delivers false result if...

 
 

bug #50649: tic / toc delivers false result if measuring over midnight

Submitter:  CH <atcl>
Submitted:  Mon 27 Mar 2017 07:52:48 AM UTC
   
 
Category:  Octave Function Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Inaccurate Result
Status:  Works For Me Assigned to:  None
Originator Name:  Open/Closed:  * Closed
Release:  * 4.2.1 Operating System:  * GNU/Linux
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Tue 28 Mar 2017 08:52:22 PM UTC, comment #5: 

Both forms of tic/toc (with the internal timer or saved in a variable) use a full-precision integer with no rollover and no time zone to store the start time, so I am not sure how the time of day or time zone or anything else would cause this to happen. Are you sure this occurred with the raw value from tic/toc or does your script do something else with the value?

We have two unable to reproduce, so unless you can show a concrete example to reproduce this, I think we'll have to close this as unreproducible.

Mike Miller <mtmiller>
Group Member
Tue 28 Mar 2017 08:51:12 PM UTC, comment #4: 

So I guess this issue can be closed for now until I figure out what is different on my systems.

CH <atcl>
Tue 28 Mar 2017 08:47:26 PM UTC, comment #3: 

This works for me as well.  I ran Octave in a terminal window yesterday and executed tic at around 10:30 a.m. local time.  I came back this morning after 24+ hours and did toc and the elapsed time was correct.


Rik <rik5>
Group administrator
Tue 28 Mar 2017 07:59:46 PM UTC, comment #2: 

I basically did the same as you. I initially found this running very long simulations. Those running inside a 24h window were fine, every a simulation crossed midnight the described results appeared.

My Octave 4.0.0 is running on Lubuntu 16.04
My Octave 4.2.1 is running on Armbian 5.25

CH <atcl>
Tue 28 Mar 2017 07:42:22 PM UTC, comment #1: 

I can't reproduce this


>> system ("date"); tic; pause (15); toc, system ("date")
Mon Mar 27 23:59:52 PDT 2017
Tue Mar 28 00:00:07 PDT 2017
Elapsed time is 15.0004 seconds.


Can you give an example that someone can reproduce? What distro/version are you running Octave on?

Mike Miller <mtmiller>
Group Member
Mon 27 Mar 2017 07:52:48 AM UTC, original submission:  

If a tic / toc time measurement is started before midnight and ended after midnight the following happens:

Octave 4.0.0 (on x86-64): negative integer is returned

Octave 4.2.1 (on arm-v7): on top of the measured time a large number, probably: 24*3600 [s] is added.



CH <atcl>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by mtmiller (Posted a comment)
  • -email is unavailable- added by atcl (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2017-03-28 rik5 Open/ClosedOpen Closed
    2017-03-28 mtmiller StatusNone Works For Me

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code