Raised This Month: $ Target: $400
 0% 

Get time in milliseconds


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Wentix
Junior Member
Join Date: Jan 2009
Old 03-16-2009 , 07:20   Get time in milliseconds
Reply With Quote #1

Hello,
I search function, that can return time in milliseconds.

Is it possible?

thx. (:
Wentix is offline
Owyn
Veteran Member
Join Date: Nov 2007
Old 03-16-2009 , 07:21   Re: Get time in milliseconds
Reply With Quote #2

wanted to ask this too
and also i wanted a function what would display time in milliseconds running up on player screen
Owyn is offline
Send a message via ICQ to Owyn
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 03-16-2009 , 07:44   Re: Get time in milliseconds
Reply With Quote #3

get_gametime() return the time since map start, with 6 decimals, if you want to print int with only 3 decimals, use %.3f.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
Owyn
Veteran Member
Join Date: Nov 2007
Old 03-16-2009 , 08:28   Re: Get time in milliseconds
Reply With Quote #4

i ment, can i display time in ms realtime increasing on player screen without sending a print to client every ms ?
Owyn is offline
Send a message via ICQ to Owyn
SnoW
Veteran Member
Join Date: Oct 2008
Location: Finland WisdomNuggets: 8
Old 03-16-2009 , 09:36   Re: Get time in milliseconds
Reply With Quote #5

Quote:
Originally Posted by .Owyn. View Post
i ment, can i display time in ms realtime increasing on player screen without sending a print to client every ms ?
You have to show it separately everytime you want it to be changed.
SnoW is offline
Send a message via MSN to SnoW
Wentix
Junior Member
Join Date: Jan 2009
Old 03-16-2009 , 10:17   Re: Get time in milliseconds
Reply With Quote #6

ConnorMcLeod, thanks, its working.

But I returned time in that format — 16.437 (seconds.milliseconds).

How can I get only milliseconds?)
Wentix is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 03-16-2009 , 11:14   Re: Get time in milliseconds
Reply With Quote #7

Quote:
Originally Posted by Wentix View Post
How can I get only milliseconds?)
You convert it.
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou is offline
Wentix
Junior Member
Join Date: Jan 2009
Old 03-16-2009 , 11:27   Re: Get time in milliseconds
Reply With Quote #8

Quote:
Originally Posted by YamiKaitou View Post
You convert it.
How?

format_time? How use it?

Wentix is offline
Old 03-16-2009, 12:33
Arkshine
This message has been deleted by Arkshine. Reason: nvm
Wentix
Junior Member
Join Date: Jan 2009
Old 03-16-2009 , 13:15   Re: Get time in milliseconds
Reply With Quote #9

In format_time only this parametres:

Code:
%a abbreviated weekday name (Sun) 
%A full weekday name (Sunday) 
%b abbreviated month name (Dec) 
%B full month name (December) 
%c date and time (Dec 2 06:55:15 1979) 
%d day of the month (02) 
%H hour of the 24-hour day (06) 
%I hour of the 12-hour day (06) 
%j day of the year, from 001 (335) 
%m month of the year, from 01 (12) 
%M minutes after the hour (55) 
%p AM/PM indicator (AM) 
%S seconds after the minute (15) 
%U Sunday week of the year, from 00 (48) 
%w day of the week, from 0 for Sunday (6) 
%W Monday week of the year, from 00 (47) 
%x date (Dec 2 1979) 
%X time (06:55:15) 
%y year of the century, from 00 (79) 
%Y year (1979)
Here is no "milliseconds".

May be exist another way to get only milliseconds?
How to remove seconds from the string?
Wentix is offline
SnoW
Veteran Member
Join Date: Oct 2008
Location: Finland WisdomNuggets: 8
Old 03-16-2009 , 13:21   Re: Get time in milliseconds
Reply With Quote #10

Code:
new Float:whole_num = 12.123;
new Float:only_decimals = whole_num - float(floatround(whole_num));
Can someone tell me what's difference with floatround_tozero and floatround_round?

Last edited by SnoW; 03-16-2009 at 13:27.
SnoW is offline
Send a message via MSN to SnoW
Reply



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 08:56.


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