FOnline: Reloaded

Development => Suggestions => Closed suggestions => Topic started by: jokeusa on August 13, 2015, 04:38:04 pm

Title: Short and simple - timestamp in console!
Post by: jokeusa on August 13, 2015, 04:38:04 pm
As in topic! Local time (not server one) - should be quick and easy to implement.
Title: Re: Short and simple - timestamp in console!
Post by: Wipe on August 13, 2015, 07:03:54 pm
So where's the code...?
Title: Re: Short and simple - timestamp in console!
Post by: jokeusa on August 14, 2015, 01:40:29 pm
So where's the code...?
Code: [Select]
#include <iostream>
#include <ctime>

using namespace std;

int main( )
{
   time_t now = time(0);
   tm *ltm = localtime(&now);
   cout << "*"<< 1 + ltm->tm_hour << ":";
   cout << 1 + ltm->tm_min << ":";
   cout << 1 + ltm->tm_sec << endl;
}
Title: Re: Short and simple - timestamp in console!
Post by: Slowhand on August 14, 2015, 01:48:21 pm
Cool. Now build and run it each time you get a message. (If you use fullscreen, use the FOnlineGL.exe because then you can Alt+Tab. I know it's basic, but I did not know for a long time.)
Title: Re: Short and simple - timestamp in console!
Post by: jokeusa on August 14, 2015, 02:42:47 pm
Cool. Now build and run it each time you get a message. (If you use fullscreen, use the FOnlineGL.exe because then you can Alt+Tab. I know it's basic, but I did not know for a long time.)

:facepalm
Thanks for that though, i really needed that laugh!

That being said, blz implement!
Title: Re: Short and simple - timestamp in console!
Post by: Wipe on August 14, 2015, 07:14:57 pm
Great. Now try your code with any FOnline client.
Title: Re: Short and simple - timestamp in console!
Post by: jokeusa on August 14, 2015, 08:46:46 pm
Great. Now try your code with any FOnline client.
I would if i knew how to/had basic knowledge about that. My point is, you don't need to be a car mechanic to know how to change an accumulator in your car.
Unless I'm utterly wrong and a local function like this IS in fact a huge issue to implement - but if that's your opinion, I'd wonder how would you back it up :-\
Title: Re: Short and simple - timestamp in console!
Post by: Kilgore on August 16, 2015, 04:53:15 pm
It would look messy, wouldn't it?
Title: Re: Short and simple - timestamp in console!
Post by: jokeusa on August 16, 2015, 07:33:21 pm
It would look messy, wouldn't it?
Just hours and minutes shouldn't make much of a difference, right?