Questions tagged [time]
Measuring the time it takes to perform an operation. Also, questions related to obtaining the current time, calculating on times, formatting and parsing times, etc.
time
29,887
questions
0
votes
0
answers
7
views
Question about adjusting service time based on number of resources in AnyLogic
Question about adjusting service time based on number of resources in AnyLogic
Hi everyone,
I'm currently working on a model in AnyLogic and I'm having a problem with dynamically adjusting service ...
0
votes
1
answer
75
views
Weird timings when measuring the perfomance of binary search [closed]
Okay, so what is happening here puzzled me for 2 days. Basically, as an activity I was measuring how much time some algorthim takes to execute in its worse, average, and best cases. Until now, I got ...
0
votes
1
answer
53
views
How do you assess code for problems handling leap seconds (particularly Java)? [duplicate]
We recently got notice that there may be a negative leap second at the end of the year and we need to determine how it will affect our programs (we write mostly Java programs). I've done some ...
-3
votes
1
answer
27
views
time.perf_counter() or time.perf_counter_ns() giving weird and incorrect values
I have written this simple while I was working with multi-processing.
from multiprocessing import Process, cpu_count
import time
def counter(num):
count = 0
while count < num:
...
0
votes
0
answers
26
views
DoEvents whilst a Time Delay Macro is running
I have a Macro in an excel sheet that selects a value in a slicer, I had a pivot which was converted to OLAP. When selecting a value in the slicer there is a short period of time where all the cells ...
0
votes
0
answers
16
views
What is the name for the time duration format like "8h 3m 4s" (as opposed to 08:03:04)?
Usually you see time durations listed using colons, like "08:03".
However that's also often ambiguous -- is that 8 hours and 3 minutes, or 8 minutes and 3 seconds? It also doesn't extend ...
-2
votes
2
answers
32
views
Calculate the time a user has been offline - React JS [closed]
I want to calculate the time the user was offline.
I'm creating a mining app and I want the mining to continue even if the user is offline, I save the date to localStorage every second to be able to ...
0
votes
0
answers
25
views
Lag-time correction between two .mat dayfiles with one taken as reference
So I'm working on creating a MATLAB script for the lag-time correction of several .mat files with the second set taken as reference.
The .mat files come from two spectrometers that sample at 10 (LGR) ...
0
votes
0
answers
45
views
pd.Timestamp() behavior in Pandas
Trying to understand why t1 takes current date whereas t2 takes the epoch date in Pandas in Python. Any thoughts would help.
import pandas as pd
t1 = pd.Timestamp("23:12:05")
print("t1:...
0
votes
1
answer
31
views
Derive values from previous Quarters
I have a table called Hyp with below data
Quarter Target Date
Q1 50 Dec 31,2023
Q2 65 Mar 30,2024
Q3 90 June 30, 2024
Q4 120 Sep 30, 2024
Basically the targets are ...
0
votes
1
answer
58
views
ASP.NET Core AddJwtBearer TimeProvider: TimeTravel proof Token Verification
We're trying to speed up some integration tests (.NET 8) by jumping into the future (by using our IClock abstraction).
This by itself works fine, but after creating a new JWT token, which also has ...
0
votes
2
answers
85
views
add date columns
I have two columns with date and I need to create another based on sum of those two. df looks like below:
date_1 date_2 result_date
2024-07-07 18:00:00....
-1
votes
0
answers
40
views
How can I optimize my program using a hashmap? [closed]
import math
from collections import defaultdict
from fractions import Fraction
n = int(input())
f_nums = list(map(int, input().split()))
s_nums = list(map(int, input().split()))
f_counts = ...
0
votes
1
answer
17
views
K6 Tests - Summary Output to include timestamps
I have a K6 test that is running multiple scenarios. I would like to export the test summary to Elastic and as part of it, would like to include the start and end times for the test run. I am trying ...
0
votes
1
answer
35
views
How can I manage to run a single processor project with all processor cores?
import multiprocessing, time
mpCores=multiprocessing.cpu_count()
print("This PC has", mpCores,"cores. Currently only utilising 1, upgrades to follow")
tic = time.perf_counter() ...