Raised This Month: $153 Target: $400
 38% 

How can i get real time (for ex. - from ntp server)


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
SideX
Senior Member
Join Date: Jun 2010
Location: Ukraine, Melitopol.
Old 08-21-2011 , 13:28   How can i get real time (for ex. - from ntp server)
Reply With Quote #1

Subject.
SideX is offline
pheadxdll
AlliedModders Donor
Join Date: Jun 2008
Old 08-21-2011 , 13:39   Re: How can i get real time (for ex. - from ntp server)
Reply With Quote #2

FormatTime.

You'll have to use sockets and send a request if you want to talk to a NTP server.
__________________
pheadxdll is offline
berni
SourceMod Plugin Approver
Join Date: May 2007
Location: Austria
Old 08-21-2011 , 17:31   Re: How can i get real time (for ex. - from ntp server)
Reply With Quote #3

Just keep sure that your system time is getting syncronized by a timeservice.
Both, windows and linux can do this easily. Then just use the Format or the GetTime() function like pheadxdll said.
__________________
Why reinvent the wheel ? Download smlib with over 350 useful functions.

When people ask me "Plz" just because it's shorter than "Please" I feel perfectly justified to answer "No" because it's shorter than "Yes"
powered by Core i7 3770k | 32GB DDR3 1886Mhz | 2x Vertex4 SSD Raid0
berni is offline
DarkEnergy
SourceMod Donor
Join Date: Apr 2008
Location: Georgia Tech, MSECE
Old 08-21-2011 , 17:35   Re: How can i get real time (for ex. - from ntp server)
Reply With Quote #4

sockets + query some web service
__________________
War3:Source Developer
"Your CPU is just a bunch of Muxes"
DarkEnergy is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 15:37.


Powered by vBulletin®
Copyright ©2000 - 2019, vBulletin Solutions, Inc.
Theme made by Freecode