C++ Keeping track of how many seconds has passed since start of program

前端 未结 5 1264
渐次进展
渐次进展 2021-02-05 15:47

I am writing a program that will be used on a Solaris machine. I need a way of keeping track of how many seconds has passed since the start of the program. I\'m talking very sim

5条回答
  •  萌比男神i
    2021-02-05 15:48

    You just need to store the date/time when application started. Whenever you need to display for how long your program is running get current date/time and subtract the when application started.

提交回复
热议问题