B4A Library NanoTime

Discussion in 'Additional libraries, classes and official updates' started by stevel05, Feb 1, 2015.

Similar threads

B4A Example [TEST RESULT] a <> b vs. Not(a = b)
B4A Question nanoTime()
B4A Question Benchmark in CPU Cycles
B4A Question CameraEx_Preview FPS
B4A Question Accelerometer write to file
  1. stevel05

    stevel05 Expert Licensed User

    Here is the first of two support libraries for my MidiSystem Library. This is a simple NanoTime wrapper.

    From the Android Docs:

    Download and unzip the file and copy the .jar and .xml files to your additional libraries folder.
     

    Attached Files:

    Volga, ilan, DonManfred and 7 others like this.
  2. jinyistudio

    jinyistudio Active Member Licensed User

    Hi

    Could you give me sample to tell me how to use it ? :p

     
  3. stevel05

    stevel05 Expert Licensed User

    Code:
    Dim NT As NanoTime
    Log(NT.NanoTime)
    How you use it depends on what you want to do with it, the value returned bears no relation to actual date/time, you can measure time passed between two calls to the timer with the most accurate clock available on your device. Example attached
     

    Attached Files:

    • NT.zip
      File size:
      7.9 KB
      Views:
      72
  4. xpectmore

    xpectmore Member Licensed User

    i know is 2 years old this thread but supposing i shouldn't fill the forum with unlinked and not usefull information :
    this is suppose to work like this ? i mean how "precise" are the results?
     

    Attached Files:

    Syd Wright likes this.
  5. stevel05

    stevel05 Expert Licensed User

    The accuracy will depend what else the device (not just your app) is doing while the timer is running. it is accurate enough to run a Midi sequencer without any noticeable delays.
     
  6. xpectmore

    xpectmore Member Licensed User

    thank you so much : for your work and for the answer that conclude me i wasn't wrong with anything ,so wasn't a misuse of your library.
    i was thinkin' that Android wasn't perfect so that why isn't this test fully functional and so i gain some experience with stuff work inside the system or did not ,
    just to know the limits.
    (ps. i don't have Java skills i don't need to learn Java ,i also do not like Java ,i programming by several languages/script languages , .exe x86/ x64 windows also =nothing c,c++ microsoft,but other better compilers such purebasic and i like b4a,even is so primary)
    happy holidays ,happy new year!
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice