Questions tagged [elapsed]

82 questions
2
votes
5 answers

Elapsed time without considering weekends and bank holidays in Java

I've implemented a stopwatch that works fine without considering that bank holidays and weekends shouldn't be counted in the total duration. I was looking for some open-source library where I could get the elapsed time, passing a start instant, end…
Juan Carlos
2
votes
1 answer

Time Elapsed/StopWatch

I want to create an ASP.NET WinForms application that tracks time on task. I need to be able to write the form so that I can add the task to the database, open it in a new tab, and be able to start, pause, and stop the task. When I'm finished, I…
spickles
  • 635
  • 1
  • 12
  • 21
2
votes
1 answer

influxDB | get elapsed time between last and first points

How to get difference between the first point in measurement and the last? Example: name: m1 time ID ms ---- -- -- 1573826041643021709 1 195 1573826041914872651 2 97 1573826042124354048 3 52 1573826042313151871 4 …
2
votes
3 answers

.NET - Timer Elapsed Event Overlap

Is there a way to detect that elapsed events of timer are overlapping? For example, I create a Timer with 200ms interval between elapsed events but the executed code at event is taking more than 200ms. As a result, another elapsed event is executed…
Alp
  • 553
  • 11
  • 30
2
votes
4 answers

Timer in XNA framework

I have a problem with my game. It is divided in a two states: GameState.MainMenu and GameState.Playing. I want to draw on screen the timer when I playing. I use gameTime.TotalGameTime.Minutesand gameTime.TotalGameTime.Seconds variable. But when I…
lukas22ew
  • 21
  • 4
2
votes
2 answers

Measure the CPU time elapsed for a part of code in JAVA

I'm currently trying to measure the real elapsed cpu time for a part of my code in java. I read that to get the CPU time you have to use the cpuTime = ManagementFactory.getThreadMXBean().getCurrentThreadCpuTime(); but in fact when I try to measure…
BodXav
  • 23
  • 1
  • 3
1
vote
0 answers

Getting surprising elapsed time in windows and linux

I have written one function which is platform independent and working nicely in windows as well as linux. I wanted to check the execution time of that function. I am using QueryPerformanceCounter to calculate the execution time in windows and…
Harish
  • 343
  • 1
  • 4
  • 14
1
vote
1 answer

System.Timers.Timer still fires Elapsed event after calling Stop() in the first round

I call Stop() in the Elapsed event and do my work, then I call Start() after my work is finished, but the Elapsed event fires again when my work is still processing. This duplicate firing only happens at the first time the WinForm starts running,…
ommmmmm
  • 13
  • 3
1
vote
3 answers

Checking elapsed time in Groovy/Grails

I'm trying to get the duration of a web-based phone call by passing a new Date value to an application at the connection time and exit time of each call. The code looks a little bit like this: class Call { Date startTime = new Date() Date…
Benjamin Kovach
  • 3,190
  • 1
  • 24
  • 38
1
vote
0 answers

Elapsed time PerfTips while debugging in Visual Studio 2022 isn't working in Docker

I have a .net core project that I deploy in Docker for Desktop. I can debug the project with breakpoints but the Elapsed time PerfTips is not showing up between lines. I have the problem only when I launch it from the Docker…
BobLePiquant
  • 11
  • 1
  • 2
1
vote
2 answers

Plot elapsed time on x axis, python panda matplotlib

I try to plot data with a elapsed time hh:mm:ss on x axis. The hh should be a ongoing number (not only 24h). The imported x raw data has the format yyyy-mm-dd hh:mm:ss and the subtraction for x2 works. import pandas as pd import matplotlib.pyplot as…
frog66
  • 19
  • 2
1
vote
1 answer

Time Elapsed and Timezones

my problem is as following : When I store a DateTime and then retrieve it and do some elapsed function to know how much time ago I stored that DateTime, I get an offset of about 7200 second, wich is 2 hours off. Im in france, so I guess its somthing…
james
  • 413
  • 4
  • 7
  • 12
1
vote
2 answers

Why does C# Timer Restarts When I Change Interval in Elapsed function

I am using System.Timers.Timer Class and I want to change it's Interval in the elapsed function. When i set Elapsed property to different value, somehow elapsed function starts firing and firing again althrough timer's Autoreset property is set to…
Rezga
  • 390
  • 1
  • 10
1
vote
2 answers

Django - how to handle time duration

I am trying to display the elapsed time during a race. class results(models.Model): race_id = models.ForeignKey(Race, on_delete=models.CASCADE) runner_id = models.ForeignKey(Runner, on_delete=models.CASCADE) race_start =…
Tizu
  • 25
  • 1
  • 6
1
vote
3 answers

Getting precise elapsed time using Java to the Millisecond

I've been searching for an answer to my dilemma and have found some useful tips but nothing that addresses my specific question, so I was hoping someone here might be able to help me out. I'm trying to get a precise elapsed time to the millisecond…
Antillies
  • 11
  • 2