Questions tagged [milliseconds]

A millisecond is a thousandth (1/1,000) of a second.

660 questions
-2
votes
1 answer

Loop every 500 milliseconds without lag

How can I do this in a WinForms app? I've tried it with a System.Windows.Forms.Timer, but when i minimize the application, I can't maximize it again. It lags up the app. I'm using the .Interval property as 500. EDIT: Code: using System; using…
abcd3fg
  • 3
  • 1
  • 5
-3
votes
4 answers

How to sleep a thread in java for few milliseconds?

I would like to sleep a thread for 1ms. I used to implement the sleep in java code with Thread.sleep(x) being x the amout of milliseconds that I want to sleep. However, I saw that it won't work with few amount of milliseconds (1 ms) because sleep…
Nfernandez
  • 646
  • 1
  • 5
  • 16
-3
votes
2 answers

How to get the sum of values per day grouped by day from an array in JS?

In JS, given an array of objects, like: [{ date: 1525655429184, value: 20.00 },{ date: 1525655429184, value: 3.99 },{ date: 1526001029184, value: 19.00 },{ date: 1526001025184, value:…
Josiel Faleiros
  • 1,437
  • 2
  • 15
  • 19
-3
votes
2 answers

c# How to truncate milliseconds with timespan?

I want to display a float that represents the timer and I am trying to format it like this: 00:00:00 (Minutes:Seconds:Milliseconds) public static string ConvertToTime(float t){ TimeSpan ts = TimeSpan.FromSeconds(t); return…
Mc Midas
  • 189
  • 1
  • 5
  • 17
-3
votes
1 answer

How do I convert a time to total milliseconds in R?

I would like to convert a time to total milliseconds in R. Example 13:00 -> 46800000
Roni Hoffman
  • 302
  • 1
  • 5
  • 17
-3
votes
1 answer

momentjs - Date (Year, month, day) to milliseconds

I'm using momentjs in my app. But I don't understand it very well. I need to get a date in milliseconds, but I need only day, month and year. Others should be set to 0 (Hours, minutes, seconds and milliseconds) I'm trying with some like this: var a…
Baumannzone
  • 760
  • 2
  • 19
  • 38
-3
votes
1 answer

How to get tenths of second, hundredth of second, etc from an NSTimeInterval

How do I get tenths of second, hundredth of second, millisecond, etc. from an NSTimeInterval in Swift?
-4
votes
1 answer

Java Calendar getTimeInMillis() Returning the Same Time

I have a piece of code like this: Calendar c = Calendar.getInstance(); long startTime = c.getTimeInMillis(); while (x < 10000000) {//check all the integers from 1 to 10000000 to //to see if they're prime or…
Kcits970
  • 640
  • 1
  • 5
  • 23
-4
votes
1 answer

How to convert from "MM:SS.MS" to "SS.MS" in PHP?

Please help to convert from "MM:SS.MS" to "SS.MS" in PHP? Thanks!
KimAl
  • 1
  • 1
-4
votes
1 answer

About System.currentTimeMillis() and Calendar.getInstance().getTimeInMillis()

Why are System.currentTimeMillis() and Calendar.getInstance().getTimeInMillis() different? import java.util.*; public class HelloWorld{ public static void main(String []args){ long t2 = Calendar.getInstance().getTimeInMillis(); …
ilw
  • 2,499
  • 5
  • 30
  • 54
-4
votes
1 answer

jQuery .animate() not responding to millisecond settings

I'm using jQuery's .animate() to move a div around, and we need it to go slower. It seems the slow, default, and fast settings have preset values of 200, 400, and 600 milliseconds, respectively, but the documentation states it can also be set to a…
Nightmare Games
  • 2,205
  • 6
  • 28
  • 46
-5
votes
2 answers

Turning timeInMills to a 24hour/Date

Is there any source code for turning the timeInMills to a 24hour/Date like from the messenger app. When the timeInMills is below 24 hour it will return like this 16:15 but when it is over 24hour it will return like this THU at 16:15. I am currently…
user8724610
-5
votes
3 answers

How to find Caloculate in miliseconds in java

In my stock management project i want to save the time Product is saved. I want to save it in this format. date + time(in miliseconds) So I used this code, which is completely failed I think. import java.text.DateFormat; import…
Dilini
  • 69
  • 4
  • 10
-8
votes
1 answer

Time in milliseconds calculation

I have two string variables for timer i.e. String StartTimer1 = "00:00:00"; String EndTimer2 = "23:59:59"; Now , I need to calculate the time left from the present time (lets say if it is 05: 30:00) once the timer has started and time left has to…
ashlesha
  • 109
  • 1
  • 2
  • 12
-11
votes
2 answers

How to change miillisecond to Date Object in yyyy-MM-dd HH:mm:ss format

How to change milliseconds to Date object in yyyy-MM-dd HH:mm:ss format like 2017-04-12 23:14:52?
Nilendu Kumar
  • 63
  • 1
  • 1
  • 5
1 2 3
43
44