Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
4000CEMGameGithub/timeMechanicTest.cpp
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
14 lines (10 sloc)
493 Bytes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <ctime> | |
#include <iostream> | |
/* This will output the day, time and date to the second */ | |
int dateTest() | |
{ | |
std::time_t result = std::time(nullptr); | |
std::cout << std::asctime(std::localtime(&result)); | |
} | |
/* Have a look at the timercpp or chrono library for potential time mechanics- my results thus far have been inconclusive as to waht is the best way to implement the time mechanic */ | |
/* https://en.cppreference.com/w/cpp/chrono/file_clock <- That should work quite well! */ |