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 8883759
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T20:53:37+00:00 2026-06-14T20:53:37+00:00

The Android docs on uptimeMillis() says: Returns milliseconds since boot, not counting time spent

  • 0

The Android docs on uptimeMillis() says:

Returns milliseconds since boot, not counting time spent in deep sleep. Note: This value may get reset occasionally (before it would otherwise wrap around).

It seems quite strange that the docs are worried about it ever wrapping around. After all, the method returns a long. A quick calculation yields that it would take approximately 292,271,023 years for it to ever wrap!!!

So what’s up with the docs? Is it really ever possible for it to wrap? Can the value perhaps wrap before it reaches the max value for a long? Is that what the docs are actually trying to say? And if so, when would it wrap?


[It’s especially puzzling as System.currentTimeMillis() is also a long that represents time since an epoch. Yet, Android makes absolutely no mention of the possibility of the value wrapping. All the more so, for uptimeMillis which starts at 0…]

  • 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-14T20:53:38+00:00Added an answer on June 14, 2026 at 8:53 pm

    This is mainly conjecture but seems to make sense based on the docs I’ve found. If we take account that native public static long uptimeMillis() in SystemClock is a native method, running in 32-bit space, and then it’s simply being cast to a Java long when you call it then it makes sense because 2^32 milliseconds is very easily reachable.

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

Sidebar

Related Questions

Acording to android docs Camera.Parameters.getSupportedPreviewSizes() returns a list of Size object. This method will
Android docs indicate: The order in terms of verbosity, from least to most is
The Android docs for In-app Billing seem to be pretty clear on the following
I am working through this tutorial https://developers.google.com/cloud-print/docs/android for google cloud print. I am trying
After following these steps: http://developers.facebook.com/docs/mobile/android/build/ I find that everything goes well, but when I
I want to integrate Facebook with my Birthday App, so I started https://developers.facebook.com/docs/mobile/android/build/ working
In the docs for OpenGL ES 2.0 on Android , it states: Caution: OpenGL
Hi I am trying to do the Spinner Tutorial for the Android. http://docs.xamarin.com/android/tutorials/User_Interface/spinner I
as someone's who's just starting to get into Android/Java programming, I've read the docs
In the Android docs on AlertDialog , it gives the following instruction and example

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.