Questions tagged [elapsed]
82 questions
1
vote
4 answers
Perl Localtime Returning 16 Hours When Input is only Seconds
I must be doing something wrong, but I can't figure it out. When I give seconds as an argument to localtime(), I get seconds and 16 hours back.
my $startTime = time;
(process)
my $endTime = time;
my $diffTime = ( $endTime - $startTime…

mmrtnt
- 382
- 1
- 8
1
vote
2 answers
Is clock-based timing reliable when CPU frequency is variable?
A common way to measure elapsed time is:
const clock_t START = clock();
// ...
const clock_t END = clock();
double T_ELAPSED = (double)(END - START) / CLOCKS_PER_SEC;
I know this is not the best way to measure real time, but I wonder if it works on…

Narcolessico
- 1,921
- 3
- 19
- 19
1
vote
0 answers
Python vs R elapsed time
In R.studio, to measure the real time passed since the program started running I use
t1=proc.time()
proc.time()-t1
In python which is the corresponding function? I want to compare them so, they need to measure the same think in the same units.
I…

D_C
- 53
- 10
1
vote
1 answer
Why is my Timer's Elapsed event never being fired?
I've got this code in a Windows Service:
public void ConfigureService()
{
//timer = new Timer { Interval = 600000 };
timer = new Timer { Interval = 10000 };
// 10 minutes; 1 second while testing
timer.Elapsed += timer_Tick;
…

B. Clay Shannon-B. Crow Raven
- 8,547
- 144
- 472
- 862
1
vote
1 answer
send alert after 5 seconds, 15 seconds... using a timer
I've made a timer but I need something to happen every 5 or 10 seconds. I don't want to use a setTimeout or setInterval function, but when I use this timer, I don't know how to address the value of seconds. should it be written like 5000 or…

eyemohini
- 11
- 3
1
vote
1 answer
Measuring time of an event in Modelica
Is there a way to measure the time at which an event occurs (without using sample or anything similar) in Modelica? something like the tic toc command in MATLAB? what I would like to see is the difference in time when different events happen. For…

Shaga
- 170
- 8
1
vote
1 answer
Compare elapsed time (eg : 08:00 am) to current time android
I am having an array of time . I am retrieving every time from it to compare it to the current time , so that remove the elapsed time and make a new array which contains left time.
I am comparing the elapsed time from the
String timeSlots[] =…

karthik kolanji
- 2,044
- 5
- 20
- 56
1
vote
1 answer
Elapsed Time for a Hadoop Task
I have a cluster running YARN on it. It has 3 datanodes and 1 client node. I submit all my jobs on the client node. How can I get the elapsed time for all the tasks in a particular job.
Probably RESTful API…

New Coder
- 499
- 4
- 22
1
vote
2 answers
How to get months and days between two date
Sorry, i've tried to code for date Months and Days remaining, unfortunately i get the wrong result. Any helps would be appreciated. Thanks!
SimpleDateFormat formatter= new SimpleDateFormat("dd-MM-yyyy");
String sdate = "08-02-2016";
String edate …

user3835327
- 1,194
- 1
- 14
- 44
1
vote
2 answers
Show "Time Left" from a set date to now
I have an application that, when a certain action occurs, the exact DATE/TIME is written as myTime using the Visual studion configuration manager where you can add settings.
This is my setting : Properties.Settings.Default.voteTime
I want as soon as…

Dan
- 57
- 1
- 4
- 10
1
vote
1 answer
VB.NET Stopwatch/TimeSpan
I'm trying to create a stopwatch that will allow a numbericupdown to adjust the time as needed. Right now if I change the numbericupdown to "2" while the time is going it will double entire value including what was already timed, which is what I…

Karl
- 17
- 1
- 7
1
vote
6 answers
Use a other Method in a static method
How can I use the method ChangeText in my static method timer_Elapsed?
public Load()
{
InitializeComponent();
System.Timers.Timer timer = new System.Timers.Timer();
timer.Interval = 1000;
// I can't transfer parameters here
…

Karl_Schuhmann
- 1,272
- 5
- 17
- 37
1
vote
1 answer
If certain time elapsed from ISO 8601 timestamp, perform specified function
I'm wondering what the best way is to perform the below functionality:
Read an ISO 8601 timestamp, say from an attribute of a HTML element
Check whether a certain amount of time has elapsed
Do function() if this amount of time has elapsed
I could…

wnajar
- 747
- 1
- 7
- 27
1
vote
2 answers
C# Creating a Timer that at a specific values changes a label
I am new to C#, and I have searched I but didn't find a simple solution to my problem.
I am creating a Windows form application.
After the start button is clicked, it counts every millisecond and when it reaches specific values from an array changes…

Jane Abrams
- 35
- 1
- 1
- 6
1
vote
1 answer
Convert 'Month and Year' string into Date object using JS and Jquery
I have two arrays ( i made them from jQuery from a table), the first is the end date, and the second is the start date. The elements are strings:
["June, 2012", "June, 2012", "August, 2011", "April, 2013", "August, 2010", "August, 2010", "April,…

chris Frisina
- 19,086
- 22
- 87
- 167