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.

0
votes
2answers
15 views

Generate Sequence of Dates and Time for each ID in R

I'm trying to figure out the way of creating sequence of dates and time in this format: 2018-01-01 01:00 till 2018-03-30 01:00 for each Patient and fill the new empty value with random numbers. My ...
1
vote
1answer
15 views

Display the published time ago of every product on Woocommerce shop page

The following code mentioned below but it displays a date on Woocommerce single product pages: add_action('woocommerce_single_product_summary','displaying_product_date', 25); function ...
0
votes
2answers
26 views

Removing Character conditionally with specific position in Javascript

This is my data format: "21/03/2019 19:18" The problem i am facing is, when ever if i am dealing with date or time there is an issue with the month ( it has 03 instead of 3 ). I am using library ...
1
vote
1answer
31 views

Java Instant.parse on Date java 8

I have some legacy KML documents which includes a time stamp entry of I why is the below date not valid when using Instant to parse? both methods are suppose to parse ISO 8601 formatted dates. String ...
0
votes
1answer
17 views

Saving elapsed time in Julia 1.0.0

temp=0 @elapsed for k in 1:1000 global temp+=k end will return elapsed time. But how can you save this into a variable? temp=0 time=@elapsed for k in 1:1000 global temp+=k end I think this ...
-1
votes
0answers
29 views

Getting NAs when Formatting Dates Using as.POSIXct [on hold]

I have three data sets, all with dates as characters that I am trying to convert using as.POSIXct. However, when I do this for the one data set, I get NAs, and I am not sure why. Here is an example. ...
0
votes
1answer
61 views

Getting Time from DateTime

This is confusing, all I want is the Time from DateTime ? here is my code: clsdbo_RR.DateRecd = reader["DateRecd"] is DBNull ? null : (DateTime?)reader["DateRecd"]; clsdbo_RR.TimeRecd = reader["...
1
vote
1answer
23 views

Sum time output from processes (bash)

I've made an script which measure the time of some processes. This is the file that I get: real 0m6.768s real 0m5.719s real 0m5.173s real 0m4.245s real 0m5.257s real 0m5.479s real ...
-1
votes
1answer
50 views

Problem with time() function in embedded application with C

I am Using time() function in programming my ARM controller. The processor restarts as soon as it reaches this function. Thats strange that when I m in debug mode the code work perfect but as soon as ...
-2
votes
0answers
20 views

I want python code for Rainfall Prediction using RNN and Time Series algorithm [on hold]

Here I attached Dataset from my project I want a code for rainfall prediction using a CSV file with RNN algorithm and Time series algorithm. The CSV file contains 1901 - 2015 and I want to get actual ...
0
votes
2answers
27 views

Regex 24 hours time validation in javascript

I am using this regex to validate time: var time = document.getElementById("time").value; var isValid = /^([0-1]?[0-9]|2[0-4]):([0-5][0-9])(:[0-5][0-9])?$/.test(time); if (isValid === false) { ...
1
vote
1answer
54 views

SQL query DATETIME is different [on hold]

Can someone help me with my query? The problem is when date has same date / time and minutes but different second example 2019-03-01 10:10:33 and the other one is 2019-03-01 10:10:44 I want to ...
-1
votes
1answer
36 views

Permanently display a time clock in the R command line

I am aware of how to add a timestamp during an R session using R> h <- taskCallbackManager() R> h$add(function(expr, value, ok, visible) { + options("prompt"=format(Sys.time(), "%H:%M:%...
2
votes
1answer
75 views

Time complexity of zipWith fibonacci in Haskell

In Haskell, the canonical zipWith implementation of the fibonacci function is : fibs :: [Integer] fibs = 1 : 1 : zipWith (+) fibs (tail fibs) I have difficulty analysing the time complexity of this (...
0
votes
0answers
10 views

Python UTC time

I am converting a time 2003 151 00:30:00. By using t ='2003 151 00:30:00' datetime.datetime.strptime(t, '%Y %j %X') give me 2003-05-31 00:30:00 I convert to seconds. year_doy_time.strftime("%s") ...
0
votes
7answers
40 views

Run Python Program Until Specific Time

I want to run my program in jupyter notebook and this program stops at specific time(for example 18:00). I wrote program by while loop and incremental index, but it's better to write it with time ...
0
votes
1answer
21 views

In R: How to extract info about valid time periods and apply it to another dataset?

I have to datasets, that I want to combine: Dataset 1: Contains time periods for which "perc" is valid: set.seed(1) example_df <- data.frame(ID = rep(1:2, each=2), start = c(as.Date("2014-01-...
0
votes
0answers
20 views

Years in RTC module for arduino

I have a question about the RTC module with Arduino board. If I adjusted the time for a specific date that I want, for example 21/03/2019 , I want command a relay on or off at a specific time (monthly,...
1
vote
1answer
21 views

group by the count of how many successive days per id in pandas

If I have a pandas df like the following: df = pd.DataFrame({ "id":[1,1,1,1,1,2,2,2,2,2,3,3,3,3,3,3,3,4,4], "date":("2000-07-06","2000-07-07","2000-07-08","2000-07-09","2000-07-10","2000-07-06",...
0
votes
3answers
77 views

Java Parking fee calculations

It seems like, I couldn't find the answer for my problem, so here I am, first on Stackoverflow :) The If statement tree that will be mentioned: buttonSzamol.addActionListener(new ActionListener() { ...
-1
votes
0answers
23 views

Find the time range for a set of categorical data

I have an excel sheet that has the following sample data. For example: The excel sheet has the following: time Speed 12:45:10 LOW 12:45:13 LOW 12:45:17 ...
1
vote
3answers
53 views

How to create a self Time triggered Function?

Looking for some self triggering function which starts on a time given. eg. A user has a conference to start at 25/04/2019 05:30 Here the user should get a notification at 25/04/2019 05:25 | 05:29 ...
0
votes
1answer
37 views

How to NOT trigger applicationSignificantTimeChange at midnight

How to NOT trigger applicationSignificantTimeChange at midnight, but use it in all other cases? This works as expected, but how to stop it on midnight or between (23:30 till 00:30)? func ...
-3
votes
0answers
50 views

Improvement of runtime

I have such code written in Python, but it's to slow. So I wrote it in C++, but I also cannot pass one of the runtime tests. I bet this code can be improved, but I wonder how… could you somehow advice ...
0
votes
1answer
16 views

Diff month days over zero

I'v tow day numbers of carbon dates in php (example below only for demonstration the dates are diffrent). Carbon::now()->day I wan't to diff the tow days. My problem is when I have for example ...
0
votes
1answer
9 views

Compare syntax on While controller jmeter 5.0

My test plan have one step need to compare current time with constant time and it set in While Controller. When current time below than constant time, thread will go inside and do some steps. But I ...
0
votes
1answer
22 views

Define dummies before and after an event

I have an event which happened at t=0. I'd like to create dummies for t-10, t-9,..., t-2, t-1, t=0, t+1, t+2 ... t+10. I have the following data structure: Date t=0 t-10 t-9 ... t+10 2015-...
0
votes
2answers
44 views

How do I calculate time difference between current time and set time in Swift

I'm trying to calculate and show the difference between current time and a user set time. Here's how I calculate current time currentTimeOutlet.text = DateFormatter.localizedString(from: Date(), ...
0
votes
0answers
33 views

How to convert long date & time format to relative to current time [duplicate]

I getting blog posts from the server and there's a method getPublished() to get post published date and time in extended format like this "2019-01-26T10:44:00+02:00" , "2019-01-23T14:57:00+02:00" , "...
0
votes
0answers
8 views

How do I print the time between each iteration to see how long each iteration takes?

"how do i print the time elapsed for each individual iteration?" def generate_master_df(o_df, s_df, o_days, s_days, metrics, extreme_thresh, o_thresh, t_start=first_o_date, t_end=now): ...
-1
votes
2answers
17 views

Time Formatting in Excel

I want to happen something like this, when i dump a data example "05:00-05:30" to cell A1, it will add space automatic to cell B1 like this "05:00 - 05:30". Below is my formula BUT, when I input "5:00-...
-1
votes
3answers
44 views

Display the item nearest to current time

I have a list of dates/times items in PHP array that are formatted like this: 2019-03-19 00:00:00 2019-03-19 02:30:00 2019-03-19 05:00:00 2019-03-19 14:30:00 2019-03-19 23:59:59 etc. I'm sure this ...
0
votes
1answer
36 views

How to get time avg data in Excel?

I have an excel sheet containing two Columns A (Timestamp) & Column B (value). A B TIMESTAMP VALUE ----------------------------- 1 1/1/2018 0:...
0
votes
0answers
37 views

Why looping gives the minimum execution time compared to list comprehension for the same dataset?

I have the below block of code, ***Scenario 1:*** def sample_function(): input = {'gw_mac': ['ac1403', 'ac15cf', 'ac15cf'], 'mac': ['820', '94c', '94c']} df = pd.DataFrame(data=input) ...
0
votes
1answer
34 views

Can a golang RFC3339Nano timestamp be reliably converted to and from a Unix timestamp?

In my golang application I'm using a Unix second-resolution timestamp (generated with time.Now().UTC().Unix()) as part of a salt in the hash function used for request authentication. There's a desire ...
0
votes
0answers
12 views

Undo a transformation on a time series model

Good day, I have a question regarding the Forecast package's function forecast(). I have a set that required a mathematical transformation of log base e and I was able to model it in an ARIMA model. ...
0
votes
2answers
24 views

Convert a playtime format PT to M:SS

How can I convert a PT4M4S format like from YouTube API format to a viewable format like 4:04 ... and maybe for interest additional PT1H4M4S to 1:04:04 both with the beginning zero by the four.
1
vote
2answers
30 views

Start interval when the next minute starts

In an agenda/calendar app I'm working on, I display a line to indicate the current time. I want to update the position of this line every minute. If I start a setInterval function when the calendar ...
0
votes
3answers
40 views

Get start time of week's first day in 00:00:00 am android

hey guys im using android time to get my data of shealth I m getting first date of week and month's correctly but im not getting time of start of day im getting output like this start: Thu, 1 Feb ...
2
votes
1answer
70 views

CPU Time for matrix matrix multiplication

I am trying to decide wether several similar but independent problems should be dealt with simultaneously or sequentially (possibly in parallel on different computers). In order to decide, I need to ...
0
votes
2answers
26 views

Mysql query - one table - find two dates within one day - of the same entity from different column + diff calculations

I'm trying to figure a mysql query to do calculations of a table containing ins and outs of people in the office. What I have: id PERSON IN OUT 1 Person A 2019-03-11 08:...
0
votes
2answers
49 views

Date Formatter NOT Reflecting Proper String if Time Difference is in Seconds

I have a scenario, where I need to save the packet received time, at some time interval. The interval is in seconds or minutes. (Less time gap). Here is my simple Test class, where I'm providing 60 ...
0
votes
0answers
27 views

Use a different reference start date than linux epoch date in python program

I have some code that uses a dataframe with timestamps and corresponding values. I have created a new column that calculates the time difference between each timestamp, but my issue is that the ...
0
votes
0answers
26 views

Why do i get undefined variable or class error

Could you please suggest how to index time here? The .mat file loaded is 101x85x355 double. %% convert from daily to weekly (8-day) averages load NEWSST_2015.mat % Convert data into timetable ...
0
votes
1answer
34 views

Trying to fill a new column in pandas table with a value from a list, using the value from an existing column in the same table as the index

I have a pandas table. That has a time stamp in a column. I have already parsed that timestamp out into something understandble. I have also already gotten the day of the week as an integer. What I'...
-1
votes
2answers
36 views

Generate timestamp for each ID in R in ascending order

I tried to generate timestamp in R for my data and I'm having problem to create them in order where each ID will take group of timestamp for the period of 14 days and I need to create them in ...
0
votes
2answers
53 views

Plotting Time and Getting the Count in R

REGISTRATION_TIME 08:53:16 13:18:57 15:57:58 09:25:47 13:35:54 12:01:31 09:37:57 12:44:47 21:26:12 21:26:12 14:56:13 02:09:31 15:28:51 15:30:57 I am trying to plot the time on the X-axis and find the ...
0
votes
0answers
28 views

How can I make a DateTime column show only times and not dates?

So I came across an issue today building a WinForms app. I have two columns one displays Date and the other Time. I am using a row filter to filter rows based on time. The only issue is I would like ...
0
votes
1answer
18 views

Can not use any time function while using json.loads() in sockets:

I am trying to make a console based multiplayer snake game using sockets in python. However, I am facing an unorthodox problem. Whenever, I use any time function say, time.sleep() or win.timeout() the ...
1
vote
0answers
18 views

Netbeans C project configuration needed to compile

In this program that I am trying to compile & run in Netbeans, I am using clock_gettime function which is not part of the C standard: #include <time.h> int main(int argc, char** argv) { ...

http://mssss.yulina-kosm.ru