-3

I'm trying to countdown on Unixtime 1635682066000. All examples on the internet are in milliseconds. I want to do this countdown over the Unixtime of the current time. I want to do this over the clock of the user's device. How can I countdown with Unix Time?

The screenshot

Regards

Tung
  • 1,579
  • 4
  • 15
  • 32
DijanDar
  • 1
  • 3
  • 1
    Does this answer your question? [Getting "unixtime" in Java](https://stackoverflow.com/questions/732034/getting-unixtime-in-java) – Shivam Puri Oct 29 '21 at 22:10
  • Your question doesn't make sense. Do you mean you want a 1 second timer? Or do you mean you want a timer to go off exactly at the time you specified and every 1s after that? In the second case, that's impossible- Android and Linux don't promise that type of timer granularity or exactness. That's the kind of thing you need a real time OS for. – Gabe Sechan Oct 29 '21 at 22:12
  • From the 1635547240000 Unixtime clock, 1635682066000 I want to count down this clock. I download real time from server. So I want to learn to countdown between 2 unixtimes. – DijanDar Oct 29 '21 at 22:42

1 Answers1

0

If you want Unix time then why you don't convert millisecond to Unix?

You can try this :

long unixTime = System.currentTimeMillis() / 1000L;

Original answer

  • Hello, I'm downloading a unixtime data from the server in real time. I want to make another data countdown with this data. This is real time : 1635549170000 This is the time to count down: 1635682066000 How can I show a unix time from real time as a countdown? – DijanDar Oct 29 '21 at 23:18