You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cordova.apache.org by "Filip Maj (JIRA)" <ji...@apache.org> on 2012/07/10 20:10:34 UTC

[jira] [Created] (CB-1022) Android acceleration sets timestamp to nanosecond time (instead of millisecond)

Filip Maj created CB-1022:
-----------------------------

             Summary: Android acceleration sets timestamp to nanosecond time (instead of millisecond)
                 Key: CB-1022
                 URL: https://issues.apache.org/jira/browse/CB-1022
             Project: Apache Cordova
          Issue Type: Bug
          Components: Android
    Affects Versions: 1.9.0
            Reporter: Filip Maj
            Assignee: Joe Bowser
             Fix For: 2.0.0


https://github.com/apache/incubator-cordova-android/blob/master/framework/src/org/apache/cordova/AccelListener.java#L218

We should probably be setting this to millesecond / system time no?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CB-1022) Android acceleration sets timestamp to nanosecond time (instead of millisecond)

Posted by "Filip Maj (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CB-1022?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13410951#comment-13410951 ] 

Filip Maj commented on CB-1022:
-------------------------------

No, it can't. Other platforms report back milliseconds... don't break out a platform specific accel JS module if you don't have to!
                
> Android acceleration sets timestamp to nanosecond time (instead of millisecond)
> -------------------------------------------------------------------------------
>
>                 Key: CB-1022
>                 URL: https://issues.apache.org/jira/browse/CB-1022
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Android
>    Affects Versions: 1.9.0
>            Reporter: Filip Maj
>            Assignee: Filip Maj
>             Fix For: 2.0.0
>
>
> https://github.com/apache/incubator-cordova-android/blob/master/framework/src/org/apache/cordova/AccelListener.java#L218
> We should probably be setting this to millesecond / system time no?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CB-1022) Android acceleration sets timestamp to nanosecond time (instead of millisecond)

Posted by "Filip Maj (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CB-1022?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13411726#comment-13411726 ] 

Filip Maj commented on CB-1022:
-------------------------------

Just ran a test. The timestamps returned in Android are completed f'ed. I'ma fix this one. Have to look into how to convert nanotime to something like a unix timestamp.
                
> Android acceleration sets timestamp to nanosecond time (instead of millisecond)
> -------------------------------------------------------------------------------
>
>                 Key: CB-1022
>                 URL: https://issues.apache.org/jira/browse/CB-1022
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Android
>    Affects Versions: 1.9.0
>            Reporter: Filip Maj
>            Assignee: Filip Maj
>             Fix For: 2.0.0
>
>
> https://github.com/apache/incubator-cordova-android/blob/master/framework/src/org/apache/cordova/AccelListener.java#L218
> We should probably be setting this to millesecond / system time no?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Assigned] (CB-1022) Android acceleration sets timestamp to nanosecond time (instead of millisecond)

Posted by "Joe Bowser (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CB-1022?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Joe Bowser reassigned CB-1022:
------------------------------

    Assignee: Filip Maj  (was: Joe Bowser)
    
> Android acceleration sets timestamp to nanosecond time (instead of millisecond)
> -------------------------------------------------------------------------------
>
>                 Key: CB-1022
>                 URL: https://issues.apache.org/jira/browse/CB-1022
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Android
>    Affects Versions: 1.9.0
>            Reporter: Filip Maj
>            Assignee: Filip Maj
>             Fix For: 2.0.0
>
>
> https://github.com/apache/incubator-cordova-android/blob/master/framework/src/org/apache/cordova/AccelListener.java#L218
> We should probably be setting this to millesecond / system time no?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CB-1022) Android acceleration sets timestamp to nanosecond time (instead of millisecond)

Posted by "Filip Maj (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CB-1022?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13410678#comment-13410678 ] 

Filip Maj commented on CB-1022:
-------------------------------

That makes sense. Can we divide it by 1000 so that the timestamp is in the right form in JS?
                
> Android acceleration sets timestamp to nanosecond time (instead of millisecond)
> -------------------------------------------------------------------------------
>
>                 Key: CB-1022
>                 URL: https://issues.apache.org/jira/browse/CB-1022
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Android
>    Affects Versions: 1.9.0
>            Reporter: Filip Maj
>            Assignee: Joe Bowser
>             Fix For: 2.0.0
>
>
> https://github.com/apache/incubator-cordova-android/blob/master/framework/src/org/apache/cordova/AccelListener.java#L218
> We should probably be setting this to millesecond / system time no?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CB-1022) Android acceleration sets timestamp to nanosecond time (instead of millisecond)

Posted by "Joe Bowser (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CB-1022?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13410947#comment-13410947 ] 

Joe Bowser commented on CB-1022:
--------------------------------

No, this has to be done in JS.
                
> Android acceleration sets timestamp to nanosecond time (instead of millisecond)
> -------------------------------------------------------------------------------
>
>                 Key: CB-1022
>                 URL: https://issues.apache.org/jira/browse/CB-1022
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Android
>    Affects Versions: 1.9.0
>            Reporter: Filip Maj
>            Assignee: Joe Bowser
>             Fix For: 2.0.0
>
>
> https://github.com/apache/incubator-cordova-android/blob/master/framework/src/org/apache/cordova/AccelListener.java#L218
> We should probably be setting this to millesecond / system time no?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CB-1022) Android acceleration sets timestamp to nanosecond time (instead of millisecond)

Posted by "Joe Bowser (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CB-1022?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13410675#comment-13410675 ] 

Joe Bowser commented on CB-1022:
--------------------------------

No. This was done to resolve a failing test on MobileSpec with the Accelerometer API. nanotime updates more than currentTimeMillis.  We might want to massage it to be millis, but that's why it was done.
https://github.com/apache/incubator-cordova-android/commit/ca1a322c7697bc2f927f4d14de309bc203a5f6ff
                
> Android acceleration sets timestamp to nanosecond time (instead of millisecond)
> -------------------------------------------------------------------------------
>
>                 Key: CB-1022
>                 URL: https://issues.apache.org/jira/browse/CB-1022
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Android
>    Affects Versions: 1.9.0
>            Reporter: Filip Maj
>            Assignee: Joe Bowser
>             Fix For: 2.0.0
>
>
> https://github.com/apache/incubator-cordova-android/blob/master/framework/src/org/apache/cordova/AccelListener.java#L218
> We should probably be setting this to millesecond / system time no?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CB-1022) Android acceleration sets timestamp to nanosecond time (instead of millisecond)

Posted by "Filip Maj (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CB-1022?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13411731#comment-13411731 ] 

Filip Maj commented on CB-1022:
-------------------------------

So, nanoTime returns system uptime. We can't use it for timestamping...
                
> Android acceleration sets timestamp to nanosecond time (instead of millisecond)
> -------------------------------------------------------------------------------
>
>                 Key: CB-1022
>                 URL: https://issues.apache.org/jira/browse/CB-1022
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Android
>    Affects Versions: 1.9.0
>            Reporter: Filip Maj
>            Assignee: Filip Maj
>             Fix For: 2.0.0
>
>
> https://github.com/apache/incubator-cordova-android/blob/master/framework/src/org/apache/cordova/AccelListener.java#L218
> We should probably be setting this to millesecond / system time no?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Resolved] (CB-1022) Android acceleration sets timestamp to nanosecond time (instead of millisecond)

Posted by "Filip Maj (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CB-1022?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Filip Maj resolved CB-1022.
---------------------------

    Resolution: Fixed

Fixed by reverting back to currentTimeMillis.

I've added additional tests to mobile-spec should we catch this issue again. See [commit c7771f|https://git-wip-us.apache.org/repos/asf?p=incubator-cordova-mobile-spec.git;a=commit;h=c7771fb8061ccd14308089315992a0b350ed5505].

The commit in Android is [2eb4c5|https://git-wip-us.apache.org/repos/asf?p=incubator-cordova-android.git;a=commit;h=2eb4c5e960d633f67c9767b9cdd254111476b2cd].
                
> Android acceleration sets timestamp to nanosecond time (instead of millisecond)
> -------------------------------------------------------------------------------
>
>                 Key: CB-1022
>                 URL: https://issues.apache.org/jira/browse/CB-1022
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Android
>    Affects Versions: 1.9.0
>            Reporter: Filip Maj
>            Assignee: Filip Maj
>             Fix For: 2.0.0
>
>
> https://github.com/apache/incubator-cordova-android/blob/master/framework/src/org/apache/cordova/AccelListener.java#L218
> We should probably be setting this to millesecond / system time no?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CB-1022) Android acceleration sets timestamp to nanosecond time (instead of millisecond)

Posted by "Joe Bowser (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CB-1022?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13410859#comment-13410859 ] 

Joe Bowser commented on CB-1022:
--------------------------------

We could do it there, or in Java.  Let's do it in Java

                
> Android acceleration sets timestamp to nanosecond time (instead of millisecond)
> -------------------------------------------------------------------------------
>
>                 Key: CB-1022
>                 URL: https://issues.apache.org/jira/browse/CB-1022
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Android
>    Affects Versions: 1.9.0
>            Reporter: Filip Maj
>            Assignee: Joe Bowser
>             Fix For: 2.0.0
>
>
> https://github.com/apache/incubator-cordova-android/blob/master/framework/src/org/apache/cordova/AccelListener.java#L218
> We should probably be setting this to millesecond / system time no?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira