Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7864955
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T23:56:40+00:00 2026-06-02T23:56:40+00:00

I am trying to find a reliable solution with regards to measuring time in

  • 0

I am trying to find a reliable solution with regards to measuring time in ios.
I’d like to show the passing of time with 1 sec precision. Exactly Like a stopwatch built in ios, but only seconds.
So far every solution I found, seems clunky, since it either uses polling with help of NStimer
or some love level C stuff.
The problem I have, is that “I” need to ask the system every time, what’s the time. But if I should rely on NStimer which is nondeterminate, then my measurement is very unreliable.
Isn’t there a delegate method called from the system that would update my time?
I guess If I enhanced the resolution of polling to 1 ns, it would be ok. But how should I implement it using low level C?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T23:56:41+00:00Added an answer on June 2, 2026 at 11:56 pm

    I’m not sure what you are aiming for. I can’t figure out if you want a good way to query a high-resolution time, or if you want the system to call you back.

    If the former, this is what I use for hi-res timer.

    #import "mach/mach_time.h"
    
    #define TICKS_TO_NANOS(_ticks_, _timebase_) (((_ticks_) * ((_timebase_).numer)) / ((_timebase_).denom))
    #define NOW_IN_TICKS() (mach_absolute_time())
    #define NOW_IN_NANOS(_timebase_) TICKS_TO_NANOS(NOW_IN_TICKS(), _timebase_)
    

    If the latter, then you can never get a guaranteed callback timer. Probably the most consistent timer callback will be to hook into CADisplayLink, but then you may not get that consistently if your graphics methods take too long.

    You can try the system timers, but you won’t get much guarantee there either.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to find a reliable solution to extract a url from a string
I've been trying to find a reliable way to get the length of time
I'm trying to find a reliable solution to determine if my page was loaded
Using VS2008sp1: trying to find a reliable way (or proper way) to update a
I'm trying to find a relatively easy and reliable method to extract the base
I'm trying to find if there is a reliable way (using SQLite ) to
I am trying to find a reliable way to control windows Wordpad, which I
I am new to LIFT, and I am trying to find a reliable instructions
i trying find something like jsfiddle.net resizable layout, but lightweight. i found http://www.jquery-css.com/download-css-jquery-templates http://layout.jquery-dev.net/
I'm trying find out where/when exactly request.user becomes an AnonymousUser. I've been searching through

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.