5 Discussion / Question Topics

Remove Filter
Member Avatar for
Member Avatar for Sudo Bash

I am writing a game in which I need to know whether or not a user preforms an action in one second or less. I can not use time() because it measures time in seconds. If the user starts the action half-way through a second it would mess with accuracy. …

Member Avatar for Yangang
0
4K
Member Avatar for johnandersen24

The function i am writing below is made to time how long it takes to process a function. // return type for func(pointer to func)(parameters for func), container eg.vector clock_t timeFuction(double(*f)(vector<double>), vector<double> v) { auto start = clock(); f(v); return clock() - start; } This is the function i want …

Member Avatar for mike_2000_17
0
655
Member Avatar for Macilath

Howdy, I have a few questions regarding the use of ctime within a class. I followed the example on [URL="http://www.cplusplus.com/reference/clibrary/ctime/strftime/"]http://www.cplusplus.com/reference/clibrary/ctime/strftime/[/URL] When the program is like this, it works: [CODE] #include <ctime> #include <iostream> using namespace std; int main(){ time_t current_seconds; current_seconds = time(NULL); //Fills current_seconds with the number of seconds …

Member Avatar for Macilath
0
683
Member Avatar for toneranger

Hi, I have a csv datafile with stock price data that I've read into a vector of structures that looks like this: 09/11/2009 9.30 open, high, low, close, volume 09/11/2009 9.31 o, h, l, c, volume and so on to 09/11/2009 16.14 o, h, l, c, volume //next day starts …

Member Avatar for Ancient Dragon
0
239
Member Avatar for tikoti

Hi all! I am trying to manage and understand dates with c++, but the output that I am having does not help much. Basically I would like to adjust a localtime that can be seen in the string "s_prueba_time" to a UTC time (in my case -2 hours in summer …

Member Avatar for tikoti
0
184

The End.