Questions tagged [elapsed]

82 questions
0
votes
1 answer

Adding a clock with elapsed time to a game (Java)

I'm working on a game/simulator and I need a timer that shows the elapsed time since the game begun. I'm using a "SimpleWindow" class as the window, called SimulationWindow, for where the visuals of the simulation is presented. The main class (Named…
djokerndthief
  • 455
  • 2
  • 4
  • 16
0
votes
2 answers

Fastest way to measure elapsed time in Java

Everything I've read about currentTimeMillis vs nanoTime seem to only focus on accuracy. If I'm only looking for elapsed time in milliseconds, which one of these should I use if I want the best performance? Seems like currentTimeMillis would be the…
Brent212
  • 1,835
  • 4
  • 19
  • 23
0
votes
2 answers

Finding the elapsed time

This is what I have so far. I am learning structure, and I had to use a structure for the assignment. I don't get what is wrong with my code. When I debug, I get 0 for hour, minute, seconds. Please look at my code. #include struct…
0
votes
1 answer

elapsed + aggregate passing custom fields in Logstash

I am using elapsed plugin to calculate time and aggregate plugin then to display it. I added custom fields to elapsed filter You can see it below: add_field => { "status" => "Status" "User" => "%{byUser}" } One is static the…
user3884425
  • 91
  • 1
  • 1
  • 6
0
votes
1 answer

C# Timer Elapsed Not Running Batch Process in Windows Service

I have implemented the following code with a Timer.Elapsed event which runs a batch process and takes a screenshot of my desktop. The batch process runs perfectly everywhere else in the code except in the ElapsedHandler. I know that the handler is…
user3685285
  • 6,066
  • 13
  • 54
  • 95
0
votes
1 answer

logstash: using multiple elapsed filters

So I've been busy with timing the time difference between some events, and came across an instance where two tasks are stopped with the same event, however, when calling the elapsed plugin twice, only the first is recorded. What should I do to make…
Aerylia
  • 2,145
  • 2
  • 10
  • 3
0
votes
1 answer

HTML5 Canvas - Elapsed Time when Pausing

I am having trouble with the delta/ elapsed time. When the window is blurred the loop pauses correctly. If you wait a few seconds and click back onto the window (focus), the elapsed time starts at a higher number and then resets back to 0. How do I…
Paddy
  • 1,175
  • 1
  • 14
  • 23
0
votes
0 answers

filtering a log file with logstash elapsed library

I'm trying to filter the following log file: +---------+---------+---------+---------+---------+---------+---------+---- .Logon hostname/username, *** Logon successfully completed. *** Teradata Database Release is 14.00.06.05 *** Teradata…
0
votes
2 answers

Elapsed time between two time in 24hr format hh:mm:ss

Hey thanks for dropping in. I just wan't to say i do apologize if anybody has came across this question before. I have spend hours searching through the forums and google for a similar problems, but no luck so far. My intention for this program is…
smuhero
  • 19
  • 10
0
votes
1 answer

PHP find the time elapsed since a date time inside a foreach loop

I'm looking fe a solution: i have a foreach loop (of posts) inside a slideshow and i need to retrieve the time elapsed since the publish date. I'm following this thread PHP How to find the time elapsed since a date time? and this is what i've done…
uomopalese
  • 471
  • 1
  • 5
  • 21
0
votes
1 answer

Count the elapsed time only after finishing the current iteration before going to the new iteration

I was trying to make a timer that would run a code each 5 seconds. But these 5 seconds could only be counted after the current code finishes to run. Example: static void Main(string[] args) { System.Timers.Timer timer = new…
Buzinas
  • 11,597
  • 2
  • 36
  • 58
0
votes
4 answers

Perl: how to know if 24hrs have passed?

I have a timestamp field on a mysql table , i want to know if that timestamp is 24hrs old or more. What would be the best way to do that in Perl?
user3325861
  • 59
  • 1
  • 1
  • 6
0
votes
0 answers

Java strange behaviour : elapsed time is faster with println

I'm seeing some strange behaviour in Java: Commenting a println makes the function execute slower. Uncommenting the println makes the function execute faster. I would expect this to be reversed, as println should cost time. The trigger is the…
imran
  • 247
  • 2
  • 11
0
votes
1 answer

Audio Recording issue using Windows Timer elapsed event

I am recording voice from my windows application on time intervals. I made a class to start and stop the voice recording and calling its function on my form. The class is as follows class VoiceRecording { [DllImport("winmm.dll", EntryPoint =…
Syed Rizwan Ali
  • 233
  • 2
  • 19
0
votes
1 answer

Get youtube video time elapsed with new youtube API library

I want to play youtube videos using new Android Youtube API. I have download demo project from google (YouTubeAndroidAPIDemo) and this is the code I use to launch a video: Intent intent = YouTubeStandalonePlayer.createVideoIntent(this,…