krkarthik_info
8 years agoFrequent Contributor
Is there any internal method to convert hh:mm:ss to seconds
Hi,
I am using StopWatch object to measure the time taken to open a file in my test application. StopWatch.toString() method returns the time taken in the string format hh:mm:ss.
I wanted to convert that returned time to seconds. Can anyone suggest me a possible solution to achieve this.
Thanks in advance.
Thanks,
Karthik K R
StopWatch.Split() or StopWatch.Stop() both return the elapsed time as an integer of milliseconds. Take that number, divide by 1000 and convert to a string and you have your number of seconds.