tagged [time]

Find out time it took for a python script to complete execution

Find out time it took for a python script to complete execution I have the following code in a python script: I want to execute this script and also find out how much time it took to execute in minute...

23 Jun at 20:44

How to multiply duration by integer?

How to multiply duration by integer? To test concurrent goroutines, I added a line to a function to make it take a random time to return (up to one second) However when I compiled, I got this error > ...

8 Aug at 15:3

Using TeraTerm to send a file, transfer rate, time

Using TeraTerm to send a file, transfer rate, time I'm using TeraTerm to transfer a file through a dial up connection, for this I will use ttl scripts in both ends to automatize it. I would like to me...

7 May at 10:12

Java string to date conversion

Java string to date conversion What is the best way to convert a `String` in the format 'January 2, 2010' to a `Date` in Java? Ultimately, I want to break out the month, the day, and the year as integ...

25 Jun at 13:53

How do I profile a Python script?

How do I profile a Python script? [Project Euler](http://en.wikipedia.org/wiki/Project_Euler) and other coding contests often have a maximum time to run or people boast of how fast their particular so...

How do I represent a time only value in .NET?

How do I represent a time only value in .NET? Is there a way one can represent a time only value in .NET without the date? For example, indicating the opening time of a shop? `TimeSpan` indicates a ra...

11 Dec at 23:59

Calculating the difference between two Java date instances

Calculating the difference between two Java date instances I'm using Java's `java.util.Date` class in Scala and want to compare a `Date` object and the current time. I know I can calculate the delta b...

Difference between CLOCK_REALTIME and CLOCK_MONOTONIC?

Difference between CLOCK_REALTIME and CLOCK_MONOTONIC? Could you explain the difference between `CLOCK_REALTIME` and `CLOCK_MONOTONIC` clocks returned by `clock_gettime()` on Linux? Which is a better ...

11 Feb at 13:42

C# Time a function using attribute

C# Time a function using attribute I want to time a function using an attribute. I would like to do something like this: upon execution of this function, if the time taken by the function is above a t...

18 Dec at 18:8

Format TimeSpan to mm:ss for positive and negative TimeSpans

Format TimeSpan to mm:ss for positive and negative TimeSpans I'm looking for a solution in .net 3.5 I wrote the following working solution: ``` private string FormatTimeSpan(TimeSpan time) { return ...

13 Jun at 22:27

Splitting timestamp column into separate date and time columns

Splitting timestamp column into separate date and time columns I have a pandas dataframe with over 1000 timestamps (below) that I would like to loop through: I'm having a hard time splitting this time...

4 Feb at 11:31

Setting time to 23:59:59

Setting time to 23:59:59 > [How can I specify the latest time of day with DateTime](https://stackoverflow.com/questions/821445/how-can-i-specify-the-latest-time-of-day-with-datetime) I need to compa...

23 May at 11:55

convert month from name to number

convert month from name to number Is there an easy way to change `$month = "July";` so that `$nmonth = 7` (`07` would be fine too). I could do a case statement, but surely there is already a function ...

1 May at 00:6

how to sync windows time from a ntp time server in command

how to sync windows time from a ntp time server in command I am working on windows 7. I can sync time of win7 from a ntp linux server manually. How can I do that in command prompt. So I can run it on ...

4 Apr at 12:0

Swift convert unix time to date and time

Swift convert unix time to date and time My current code: The results: `println(timeResult)` = 1415639000.67457 `println(NSDate())` = 2014-11-10 17:03:20 +0000 was just to test to see what `NSDate` wa...

23 May at 08:49

How to parse unix timestamp to time.Time

How to parse unix timestamp to time.Time I'm trying to parse an Unix [timestamp](https://golang.org/pkg/time/) but I get out of range error. That doesn't really makes sense to me, because the layout i...

13 Jul at 21:44

In Python, how do you convert seconds since epoch to a `datetime` object?

In Python, how do you convert seconds since epoch to a `datetime` object? The `time` module can be initialized using seconds since epoch: Is there an elegant way to initialize a `datetime.date

6 Dec at 18:55

How do I check the difference, in seconds, between two dates?

How do I check the difference, in seconds, between two dates? There has to be an easier way to do this. I have objects that want to be refreshed every so often, so I want to record when they were crea...

24 Jun at 20:1

Oracle DateTime in Where Clause?

Oracle DateTime in Where Clause? I have sql something like this: -> This returns 10 rows and TIME_CREATED = '26-JAN-2011' Now when i do this i don't get any rows back, -> Took th

30 Oct at 15:56

Multiply TimeSpan in .NET

Multiply TimeSpan in .NET How do I multiply a TimeSpan object in C#? Assuming the variable `duration` is a [TimeSpan](http://msdn.microsoft.com/en-us/library/system.timespan.aspx), I would like, for e...

11 Jan at 16:36

How to increase ToolTip display time?

How to increase ToolTip display time? I have one GridView, in its RowDataBound Event, I am assigning ToolTip as below: ``` protected void gv_RowDataBound(object sender, GridViewRowEventArgs e) { try...

Get time in milliseconds using C#

Get time in milliseconds using C# I'm making a program in which I need to get the time in milliseconds. By time, I mean a number that is never equal to itself, and is always 1000 numbers bigger than i...

What is the easiest way to get current GMT time in Unix timestamp format?

What is the easiest way to get current GMT time in Unix timestamp format? Python provides different packages (`datetime`, `time`, `calendar`) as can be seen [here](https://stackoverflow.com/questions/...

14 Oct at 20:36

How do I convert a date/time to epoch time (unix time/seconds since 1970) in Perl?

How do I convert a date/time to epoch time (unix time/seconds since 1970) in Perl? Given a date/time as an array of (year, month, day, hour, minute, second), how would you convert it to epoch time, i....

26 Feb at 11:16

How do I get the day of week given a date?

How do I get the day of week given a date? I want to find out the following: given a date (`datetime` object), what is the corresponding day of the week? For instance, Sunday is the first day, Monday:...

23 May at 07:14