System stop watch accuracy

Hi,
I'm developing a stop watch on iOS. The elapsed time is calculated based on the system clock. I found that there is an inaccuracy of about 2sec per day compared to the mac system time. Mac system time should be correct as it it synced automatically. I also tested the integrated stop watch on iPhone and it also runs faster than the mac system clock.
1. is this a bug?
2. any ideas how to get better accuracy for stop watch?
Thanks,
Jonathan

Hi,
I'm developing a stop watch on iOS. The elapsed time is calculated based on the system clock. I found that there is an inaccuracy of about 2sec per day compared to the mac system time. Mac system time should be correct as it it synced automatically. I also tested the integrated stop watch on iPhone and it also runs faster than the mac system clock.
1. is this a bug?
2. any ideas how to get better accuracy for stop watch?
Thanks,
Jonathan

Similar Messages

  • Problems with a simple stop watch program

    I would appreciate help sorting out a problem with a simple stop watch program. The problem is that it throws up inappropriate values. For example, the first time I ran it today it showed the best time at 19 seconds before the actual time had reached 2 seconds. I restarted the program and it ran correctly until about the thirtieth time I started it again when it was going okay until the display suddenly changed to something like '-50:31:30:50-'. I don't have screenshot because I had twenty thirteen year olds suddenly yelling at me that it was wrong. I clicked 'Stop' and then 'Start' again and it ran correctly.
    I have posted the whole code (minus the GUI section) because I want you to see that the program is very, very simple. I can't see where it could go wrong. I would appreciate any hints.
    public class StopWatch extends javax.swing.JFrame implements Runnable {
        int startTime, stopTime, totalTime, bestTime;
        private volatile Thread myThread = null;
        /** Creates new form StopWatch */
        public StopWatch() {
         startTime = 0;
         stopTime = 0;
         totalTime = 0;
         bestTime = 0;
         initComponents();
        public void run() {
         Thread thisThread = Thread.currentThread();
         while(myThread == thisThread) {
             try {
              Thread.sleep(100);
              getEnd();
             } catch (InterruptedException e) {}
        public void start() {
         if(myThread == null) {
             myThread = new Thread(this);
             myThread.start();
        public void getStart() {
         Calendar now = Calendar.getInstance();
         startTime = (now.get(Calendar.MINUTE) * 60) + now.get(Calendar.SECOND);
        public void getEnd() {
         Calendar now1 = Calendar.getInstance();
         stopTime = (now1.get(Calendar.MINUTE) * 60) + now1.get(Calendar.SECOND);
         totalTime = stopTime - startTime;
         setLabel();
         if(bestTime < totalTime) bestTime = totalTime;
        public void setLabel() {
         if((totalTime % 60) < 10) {
             jLabel1.setText(""+totalTime/60+ ":0"+(totalTime % 60));
         } else {
             jLabel1.setText(""+totalTime/60 + ":"+(totalTime % 60));
         if((bestTime % 60) < 10) {
             jLabel3.setText(""+bestTime/60+ ":0"+(bestTime % 60));
         } else {
             jLabel3.setText(""+bestTime/60 + ":"+(bestTime % 60));
        private void ButtonClicked(java.awt.event.ActionEvent evt) {                              
         JButton temp = (JButton) evt.getSource();
         if(temp.equals(jButton1)) {
             start();
             getStart();
         if(temp.equals(jButton2)) {
             getEnd();
             myThread = null;
         * @param args the command line arguments
        public static void main(String args[]) {
         java.awt.EventQueue.invokeLater(new Runnable() {
             public void run() {
              new StopWatch().setVisible(true);
        // Variables declaration - do not modify                    
        private javax.swing.JButton jButton1;
        private javax.swing.JButton jButton2;
        private javax.swing.JLabel jLabel1;
        private javax.swing.JLabel jLabel2;
        private javax.swing.JLabel jLabel3;
        private javax.swing.JPanel jPanel1;
        // End of variables declaration                  
    }

    Although I appreciate this information, it still doesn't actually solve the problem. I can't see an error in the logic (or the code). The fact that the formatting works most of the time suggests that the problem does not lie there. As well, I use the same basic code for other time related displays e.g. countdown timers where the user sets a maximum time and the computer stops when zero is reached. I haven't had an error is these programs.
    For me, it is such a simple program and the room for errors seem small. I am guessing that I have misunderstood something about dates, but I obviously don't know.
    Again, thank you for taking the time to look at the problem and post a reply.

  • Add Stop Watch in Form using LiveCycle Designer

    Hi,
    How can I add a stop watch into a Form created with Adobe Live Cycle Designer 8.0?
    Basically I'd like the following:
    I am creating a read-out form for a radiologic study. So the reader should be able to push a button on the very beginning of the form which should trigger a stopwatch to start. At the very end of the form, there should be a 2nd button which the reader can push when he's finished reading and filling out the form to stop the stop watch which was running in the background. The resulting time should then be displayed and saved in a field for export to Excel later on. Is this possible using JavaScript?
    If this doesn't work, alternatively there could be a button to push in the beginning of the form which would put the actual Date/Time in a Field and at the bottom of the Form a second button which would again show the actual date/time in a field. This way I would export the two fields into Excel and then let Excel calculate the needed time to fill out the form.
    When I add a Date/Time Field, it updates, whenever someone makes a change to the form.
    Thank you for your help,
    Olivio Donati

    There is no stop watch per se.... but your technique of getting the time should work here. On the click event of the Start button you will need to record the time in a hidden field (so you can get at it later). On the Finish button you can record the time again and then get the difference between the stop and start time. FormCalc has some built in functions that will change a given time to the number of milliseconds that have elapsed from a specific epoch. You will need this to do the time calc.

  • Kernel-Power Event ID 41: The system has rebooted without cleanly shutting down first. This error could be caused if the system stopped responding, crashed, or lost power unexpectedly.

    Hello,  Currently we are seeing this issue with a couple of our Lenovo T420s laptops with a Solid State Drive.  ruffly about 10 or so.  The Reboots happen randomly and do not create a dump file.  We have contacted Lenovo and they are
    not sure why its happening.  Since this Crash I set it for Minidump this did not work my next steps will be to Disable Automatic restart on System Failure to see if it brings anything up.  I am also looking at using Procmon to dump to a file as well. 
    If anyone has any other ideas please let me know.
    The system has rebooted without cleanly shutting down first. This error could be caused if the system stopped responding, crashed, or lost power unexpectedly.
    + System
      - Provider
       [ Name]  Microsoft-Windows-Kernel-Power
       [ Guid]  {331C3B3A-2005-44C2-AC5E-77220C37D6B4}
       EventID 41
       Version 2
       Level 1
       Task 63
       Opcode 0
       Keywords 0x8000000000000002
      - TimeCreated
       [ SystemTime]  2012-02-01T00:02:48.677610900Z
       EventRecordID 8270
       Correlation
      - Execution
       [ ProcessID]  4
       [ ThreadID]  8
       Channel System
       Computer LR8K6TLC.cntr.thrivent.corp
      - Security
       [ UserID]  S-1-5-18
    - EventData
      BugcheckCode 0
      BugcheckParameter1 0x0
      BugcheckParameter2 0x0
      BugcheckParameter3 0x0
      BugcheckParameter4 0x0
      SleepInProgress false
      PowerButtonTimestamp 129725280988099400
    Event 89, Kernel-Power
    ACPI thermal zone ACPI\ThermalZone\THM0 has been enumerated.            
    _PSV = 0K            
    _TC1 = 0            
    _TC2 = 0            
    _TSP = 0ms            
    _AC0 = 0K            
    _AC1 = 0K            
    _AC2 = 0K            
    _AC3 = 0K            
    _AC4 = 0K            
    _AC5 = 0K            
    _AC6 = 0K            
    _AC7 = 0K            
    _AC8 = 0K            
    _AC9 = 0K            
    _CRT = 371K            
    _HOT = 0K            
    _PSL - see event data.
    ---- Details
    +
    System
    Provider
    [ Name]
    Microsoft-Windows-Kernel-Power
    [ Guid]
    {331C3B3A-2005-44C2-AC5E-77220C37D6B4}
    EventID
    89
    Version
    0
    Level
    4
    Task
    86
    Opcode
    0
    Keywords
    0x8000000000000020
    TimeCreated
    [ SystemTime]
    2012-02-01T00:02:49.270411900Z
    EventRecordID
    8271
    Correlation
    Execution
    [ ProcessID]
    4
    [ ThreadID]
    68
    Channel
    System
    Computer
    LR8K6TLC.cntr.thrivent.corp
    Security
    [ UserID]
    S-1-5-18
    EventData
    ThermalZoneDeviceInstanceLength
    21
    ThermalZoneDeviceInstance
    ACPI\ThermalZone\THM0
    AffinityCount
    1
    _PSV
    0
    _TC1
    0
    _TC2
    0
    _TSP
    0
    _AC0
    0
    _AC1
    0
    _AC2
    0
    _AC3
    0
    _AC4
    0
    _AC5
    0
    _AC6
    0
    _AC7
    0
    _AC8
    0
    _AC9
    0
    _CRT
    371
    _HOT
    0
    _PSL
    0000000000000000
    Thank you.

    We have tested and checked both the Bios and firmware of the SSD Drive's
    Bios was up to date and no issue
    Firmware was also up to date as well.  
    Users are still experiencing random Reboots.   I tried to capture the issue with Procmon but since the PC shutdown (Goes to a black screen no power at all even when turning the "Automatically
    restart" off under Startup and Recovery) No dmp files as of yet.  Unable to configure Procdump due to not knowing where the issue is and what is causing it to happen.
    Going to replace one of the PC's with a New one with different hardware to see if this resolve the issue.  If anyone has any idea's to be able to capture what maybe happening that would
    be great.
    Thank you.

  • LiveCycle form stop watch

    Is it possible to create a stop watch that the form user can start and stop as many times as needed. When finished, the total time recorded by the stop watch would be displayed.
    Example:
    User starts the stop watch at 08:08:00 stop watch displays 00:00:00
    User stops the stop watch at 08:45:10 stop watch displays 00:37:10
    User starts the stop watch at 09:15:00 stop watch displays 00:37:10 (when started but shows time accumulating)
    User stops the stop watch at 09:30:25 stop watch displays 00:52:35
    Total time recorded is displayed 00:52:35
    If someone has an example form, I would appreciate your help. I have seen a stop watch in an Acrobat form but do not know how to convert it to LiveCycle.

    I understand how to get the current time and the time when the clock is stopped. I also understand how to subtract the numbers and then convert them back to time. I have never used variables. I know where they go and how to create them but do not know how to use them in a script. Is there any chance to could create an example? I need to be able to start and stop the clock several times and end up with the total time recorded.
    Does anyone have an example LiveCycle form with a stop watch? Am I the only one who has ever needed this?

  • TA24260 My XP PC system stopped loading the iStore. I just get the store header screen with bl

    My XP PC system stopped loading the iStore. I just get the store header screen with blank screen. The firewall settings are correct. I can access the store on the iPad. Any ideas?  Thanks, Miki

    Attached is Dennis Linam’s Audition – “Log File” and “Log – Last File”
    Contact information Dennis [email protected]
    Previous contact information with your organization (DURIM):
    Dennis - i just finished my audition trial and bought the subscription the 2014 version.
    created by durin in Audition CS5.5, CS6 & CC - View the full discussion 
    DURIM - Okay.  I would expect the "Cache Warning" message because your default directories would not be the same as the ones in the settings file I generated.
    If you go back to the "7.0" directory and open the "Logs" folder, can you copy the "Audition Log.txt" file and send it as an attachment to [email protected]?  We'll take a look in that logfile and see if it gives us more information about why this is failing now.
    Also, do you have any other Adobe applications installed on this machine, such as Premiere Pro?  If so, do they launch as expected or fail as well?
    I do have the trial Pro version of Adobe reader, but I have not activated it, because I fear the same thing will happen did it. I cannot afford to activate the subscription for that product and take the chance of it not working either. I depend on those two programs religiously. Here is the files that you requested. I appreciate any help you can give me to get this audition program started
    Audition Log- file
    Ticks = 16       C:\Program Files (x86)\Common Files\Adobe\dynamiclink\7.0\dynamiclinkmanager.exe
    Sent from Windows Mail

  • Setting up a stop watch

    Hi, could somebody please help me with setting up a stopwatch in my program to count time? I've attached my VI and it includes my attempt at trying to set up a stopwatch. The problem is that it is counting but my program doesn't seem to stop and data is aqcuired when the VI is run once. SO I'm not getting continuous data acquisition. Also, I can't seem to stop the program. I have to abort it. I would really appreciate anyone's help on this.
    Thanks
    Attachments:
    single channel, CV, amp v8.vi ‏875 KB

    Hello,
    thank you for your suggestions. I have made the changes and tidied up my block diagram. The stop watch works now but the only issue now is that the interface just displays the results the first time round the data is acquired i.e. when the Vi is run the first time round. The reason why I had put everything in a loop was because everytime  a new set of data was acquired, the interface would display the results and save all the data that is  acquired not only the first set.. Now, I can only save and display the first set of data. Any suggestions to this issue wil be appreciated. I've attached the modified Vi.
    Thanks
    Attachments:
    single channel, CV, amp v9.vi ‏873 KB

  • N95, where is the stop watch gone?

    I am missing a very usefull utility I have been useng ever since Nokia phones, it is the stop watch with rounds, spiltts etc...
    is there an extra aplication arround?

    There are a few, Handy Alarm I think is one, but when I looked it was like 20 bucks, which I think is way to expensive for what it is.
    A cheaper - but so far as I can tell - equally good option is The Time Machine:
    http://www.handango.com/PlatformProductDetail.jsp?siteId=1&jid=163CAFF2XC172B589EC6A675C43EB9CA&plat...
    It's only $5. I downloaded the 10 day trial yesterday and so far it seems pretty good with a pretty decent feature set.
    I had to fiddle about a bit to get the sounds working - there are instructions on the Description page at the above URL - but otherwise it works very well.
    Support seems pretty good too: being a fella, I hadn't read the instructions so I actually e-mailed the developer about my sound issue and got a response back the same day.

  • When I try to save a file the system stops responding.

    When I try to save a file the system stops responding.

    Thanks, Bill. Here's what I get when I try to "save as"

  • System stopped detecting wifi networks

    Okay it's really weird, today suddenly my router stopped working (to be more specific, wifi stopped working, i didn't have time for further investigating).
    I turned it off for about half hour and after turning it on again everything seemed to be okay, but my system stopped seeing most of networks (including my home network).
    I did little investigation and my smartphone, notebook and even windows on the same machine, all of them see all networks and can connect to my home network, so it's propably not router's fault.
    My wifi card is TP-Link W851ND (and as mentioned above, on windows everything works great so i guess it's something with linux).
    I'm using Cinnamon so i'm connecting via networkmanager (but iw .. scan also sees only few networks).
    I thought that maybe newer version of some package may be guilty (i ran system upgrade in meantime) but i downgraded all affected packages and nothing changed.
    I'm stuck, any ideas what might cause the problem?
    Last edited by smiechowy (2014-07-06 20:19:10)

    If you decide to pay the service fee, Apple will replace the whole phone for a new one, same model and size:
    Model
    Out-of-warranty service fee
    Battery service*
    iPhone 6 Plus
    $329
    $79
    *available only if battery
    fails Apple’s diagnostic test
    iPhone 6
    $299
    iPhone 5s, iPhone 5c, iPhone 5
    $269
    iPhone 4s
    $199
    iPhone 4, iPhone 3GS, iPhone 3G,
    Original iPhone
    $149
    Plus a $6.95 shipping fee, if required. Fees are in USD and exclude local tax. Pricing is for service through Apple. The final service fee we charge will be determined during testing and may be less than the service fee listed above. Pricing and terms vary for service through an Apple Authorized Service Provider.
    copied from Apple - Support - Service Answer Center

  • Catalyst control system stop working

    recently i upgrade my laptop from windows 8 to 8.1 my laptop is hp pavilion e015tx after updating operating system when i try to open "configure switchable graphics" or " graphics properties" it will not open and give message "catalyst control control system stopped working"
    please help me some one

    Hey @prakhar12 ,
    We meet again!
    The CCC software may need to be updated to work on Windows 8.1.
    Please try installing the most recent version from the HP website here: AMD High-Definition (HD) Graphics Driver.
    This package contains the drivers for both the Intel and AMD GPU so that your switchable graphics will work in Windows 8.1.
    Let me know if that helps!
    Please click the "Kudos, Thumbs Up" at the bottom of this post if you want to say "Thanks" for helping!
    Please click "Accept as Solution" if you feel my post solved your issue, it will help others find the solution.
    The Great Deku Tree
    I work on behalf of HP.

  • Completely new to lab view and need to get some stop watch help please

    OK I am new to lab view so please be patient with me. I have a need for a stop watch that is triggered to start when two voltage values differ by more than 0.110V and then stop counting when they return to within 0.110v my goal is to capture the total amount of time the two voltages differ and record it along with the rest of the data is this possible and how would I do it? Thanks I am running 8.5

    danger831 wrote:
    thanks for the quick response but thats not really enough info to help me as I am very very unfamiliar with lab view and have only been using it for a few days(mainly just plugging in copied sections) so hopefully someone can give me a little more help. But the good news is I am now looking into taking one of the Lab view courses but that probably won't help me with this problem this week. thanks again for your help
    For starters, try to write the name correctly. It is LabVIEW, not lab view.
    Seriously though, your best way of learning to is try some things yourself first. Look through the examples that ship with LabVIEW for the components Raven suggested (while loops, shift registers, etc.) We could give you a working example but you will learn far more by trying things for yourself. As suggested, try a few things and then post what you have done and what you are having trouble with. From there we can answer your questions rather than just do it for you.
    Mark Yedinak
    "Does anyone know where the love of God goes when the waves turn the minutes to hours?"
    Wreck of the Edmund Fitzgerald - Gordon Lightfoot

  • Lost trying to create a stop watch

    I'm attempting the use the timer class to create a plain stop
    watch that counts down from 10 mins.
    I can't seem to find any tutorials for AS3. Can someone
    provide a link?
    Thanks for your assistance.

    peggy818 wrote:
    … I'm lost and I'm just starting.  Not sure I like the new version.  …
    have a read in the Manual:
    http://help.apple.com/imovie/mac/10.0/?lang=en#mov755717b21

  • N97 no stop watch or count down timer?

    There are some basic functions you expect on every phone, not least on the flag ship of Nokia. I havn't had a nokia for a while but my last one had both timer and stop watch, I was really surprised to find these functions were missing and that you have to pay for third party apps to get these functions.
    There are several threads on this forum about these apps missing from other S60 models. Are there any plans on releasing these apps or do I need to get the freeking egg timer? 

    Thanks for that, great app! Simple and functional.
    It has a bug in it though. When the counter gets down to 5 sec or so, the time changes to 9.59.59. It happened twice the first two minutes I tested the app but I haven't been able to reproduce it now for a while now. Hope it doesn't happen when the cake is in the oven
    Still, even though s60 never had these apps, I can't see why they couldn't just start providing providing them. Unless they want 3rd party application programmers to have a really simple app to start with and make some chash to keep them going for more advanced apps. 
    Message Edited by sidan77 on 15-Jul-2009 09:51 PM

  • System Stop while using Google Earth

    Hi,
    Today I downloaded google earth and installed it on my system, while using the program my system stopped for the first time.
    As suggeted in the message I shut down the notebook and restarted after sometime, once again it shut down while google earth was running. The message displayed was;
    system stopped: 0x0000008E (0x80000004, 0x80709AD1, 0xA8B9454C, 0x00000000)
    Whats the problem.
    Solved!
    Go to Solution.

    i see you have not mentioned your system specs?if your's is a new system or has direct x support or even(opengl) you may not have to these kinds of issues kindly post your system configuration to have further assesement regarding this matter
    ps:google earth works flawlessly on my system
    Cheers and regards,
    • » νιנαソѕαяα∂нι ѕαмανє∂αм ™ « •
    ●๋•کáŕádhí'ک díáŕý ツ
    I am a volunteer here. I don't work for Lenovo

Maybe you are looking for

  • Requisitions for sale order stock

    Requisitions for sale order stock that are generated directly from the sales order are not passed to SRM but requisitions that are created manually for sales order stock are passed to SRM. Why is the sourcing of a requisition for sales order stock wh

  • How to use Flex tag library in jsp

    Hi All, We are planning to use flex in our J2EE application in order to show some charts. Our j2ee application is in JSP,Struts. I have searched on google about this and found that I can include flex 3 tab library in the jsp in order to use mxml tag

  • How to reset ipad if i dont know the icloud info

    help

  • Permissions issues with xserve 10.6

    I've created a sharepoint that is the main folder for all of my users, OfficeShare. I have set up permissions on this folder to allow all users in the office group to be able to read, write , delete , modify etc. I have enabled inherit permission fro

  • OBIEE Group By

    I have two columns Tracking Name and Tracking Group. Now i need to display Column A Column B Column C Column D ABC Original Root Error Now , column B = case when Tracking Group = ' Original' then Tracking Name else '' end .Similarly column C = case w