Questions tagged [seconds]
333 questions
4
votes
1 answer
Python : Celery, How can I make it run in background?
I use celery, with python 3 and supervisor in Ubuntu.
I've been working to make a new API, which will get an image from the internet using PIL(Pillow) and save it in a server.
However the problem is that I use Celery as scheduler and in the…
user6922072
4
votes
2 answers
java.time.Period to seconds
How to convert java.time.Period to seconds?
The code below produces unexpected results
java.time.Period period = java.time.Period.parse( "P1M" );
final long days = period.get( ChronoUnit.DAYS ); // produces 0
final long seconds = period.get(…

Seweryn Habdank-Wojewódzki
- 2,037
- 4
- 30
- 51
4
votes
7 answers
VBA - Remove Seconds from NOW function
I have something that notify me an hour before it happens. For that, I use the NOW function in VBA as I need it to check for the Date as well.
The problem is the script runs every 20 seconds so I can't have it consider seconds for the NOW…

Francis Maltais
- 246
- 3
- 14
4
votes
1 answer
UIDatePicker display seconds
Is there any chance to display seconds in uidatepicker? I don't really see reference for this.

dombesz
- 7,890
- 5
- 38
- 47
4
votes
2 answers
MySQL convert seconds to datetime
So I have an integer '63605914755' like this:
SELECT TO_SECONDS( '2015-08-04 13:40:56' )
-----
Result: '63605914755'
How do I convert '63605914755' back from seconds to datetime (Ex: '2015-08-04 13:40:56') ?

Maxime
- 43
- 1
- 1
- 4
4
votes
1 answer
Objective-C: Adding 10 seconds to timer in SpriteKit
I used someone else's code for writing a timer in SpriteKit, and tweaked it a bit. Here's what my code looks like:
- (void)createTimerWithDuration:(NSInteger)seconds position:(CGPoint)position andSize:(CGFloat)size
{
// Allocate/initialize the…

Christian Kreiter
- 610
- 1
- 5
- 16
4
votes
5 answers
C - How to ENSURE different random number generation in C when program is executed within the same second?
For an assignment, I am supposed to ensure that, even when I execute a program within the same second, I should return different numbers. However, I've read other posts and can't quite figure out how to do so specifically within the same second. If…

homersimpson
- 4,124
- 4
- 29
- 39
4
votes
3 answers
Timespan(0,0,secs) or Timespan.FromSeconds(secs)
Is there a difference in the returned values between Timespan(0,0,secs) and Timespan.FromSeconds(secs)?
It seems to me the difference is that FromSeconds accepts a double.

Yariv
- 12,945
- 19
- 54
- 75
4
votes
4 answers
batch - File last modification time with seconds
I want to know when a file has been modified for the last time.
I can get these infos using the following batch script:
FOR %%i IN (myfile) DO SET modif_time=%%~ti
The problem is that I need the second of the last modification and the command %~t…

user3133076
- 75
- 1
- 2
- 11
4
votes
4 answers
How would I make my javascript timeout for only 3 seconds?
If 4e3 is equal to 4 seconds. What would I use for 3 Secs? or 2 Secs?

user1824806
- 65
- 1
- 2
- 8
3
votes
1 answer
Converted timestamp value in seconds is not reversing to original timestamp in python
I have a string timestamp. I want to convert it to seconds and then again later I want to convert that seconds into a timestamp. So for this, I converted the string to timestamp first then calculated seconds. Again I converted that seconds into a…

BC Smith
- 727
- 1
- 7
- 19
3
votes
1 answer
Stopwatch as input in shiny for R
Is there a possibility of having a visible stopwatch (startable and stoppable) in an R shiny app, of which the amount of seconds could be used as an input value?
I do not know of any implementations. Is there a simple way to do this?
Thanks for…

anvilactual1234
- 33
- 2
3
votes
3 answers
Averages by Time in R
I have compounds concentrations measured every second. I want to make 30 and 60 seconds averages. I have been reading the posts here, I tried lubridate and dplyr. But no luck. I am trying to make this work, but I have not been able to do so. i am…

Fern
- 41
- 2
3
votes
4 answers
Any class in C# that can tell me clock tick, seconds consumed by a function
Is there a class in C# that can give me clock ticks, seconds consumed by a method? I guess I have two wrap that functionality around function to time the ticks and seconds taken up.
user349026
3
votes
3 answers
Determine seconds between two dates in Python
I'm calling the Office 365 Calendar API and receiving the start date of the event back in the following format:
2016-05-20T08:00:00Z
I want to check when an event is near e.g. 5 minutes time, and use something along the lines of the following…

user2823030
- 109
- 2
- 6