November 23, 2026, 03:50:10 am
Username:

Password:

Topic: Short and simple - timestamp in console!  (Read 6181 times)

jokeusa

  • Posts: 156
    • View Profile
Short and simple - timestamp in console!
« on: August 13, 2015, 04:38:04 pm »
As in topic! Local time (not server one) - should be quick and easy to implement.
Reality is a momentary dream but a dream is a reality for an eternity.

Wipe

  • Posts: 54
  • Random is god
    • View Profile
    • FOdev
Re: Short and simple - timestamp in console!
« Reply #1 on: August 13, 2015, 07:03:54 pm »
So where's the code...?
Games are meant to be created, not played...


jokeusa

  • Posts: 156
    • View Profile
Re: Short and simple - timestamp in console!
« Reply #2 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;
}
Reality is a momentary dream but a dream is a reality for an eternity.

Slowhand

  • Posts: 282
  • Go for the eye, Boo! Go for the eyes!
    • View Profile
Re: Short and simple - timestamp in console!
« Reply #3 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.)

jokeusa

  • Posts: 156
    • View Profile
Re: Short and simple - timestamp in console!
« Reply #4 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!
« Last Edit: August 14, 2015, 03:06:41 pm by jokeusa »
Reality is a momentary dream but a dream is a reality for an eternity.

Wipe

  • Posts: 54
  • Random is god
    • View Profile
    • FOdev
Re: Short and simple - timestamp in console!
« Reply #5 on: August 14, 2015, 07:14:57 pm »
Great. Now try your code with any FOnline client.
Games are meant to be created, not played...


jokeusa

  • Posts: 156
    • View Profile
Re: Short and simple - timestamp in console!
« Reply #6 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 :-\
Reality is a momentary dream but a dream is a reality for an eternity.

Kilgore

  • Administrator
  • Posts: 1355
    • View Profile
Re: Short and simple - timestamp in console!
« Reply #7 on: August 16, 2015, 04:53:15 pm »
It would look messy, wouldn't it?

jokeusa

  • Posts: 156
    • View Profile
Re: Short and simple - timestamp in console!
« Reply #8 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?
Reality is a momentary dream but a dream is a reality for an eternity.