Raised This Month: $12 Target: $400
 3% 

Solved [ H3LP ] Unix time


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
CrazY.
Veteran Member
Join Date: May 2015
Location: SP, Brazil
Old 05-20-2018 , 15:53   [ H3LP ] Unix time
Reply With Quote #1

Hello, I'm developing a ban system with vault/unix time. I've some doubts:

1. How I can add minutes to a unix time?

2. How I can get when systime reach a unix time/date that I given? (set_task? server_frame?)
__________________









Last edited by CrazY.; 05-20-2018 at 16:47.
CrazY. is offline
esenrik
Senior Member
Join Date: Jul 2010
Old 05-20-2018 , 16:15   Re: [ H3LP ] Unix time
Reply With Quote #2

Hello.

1. Unix time count is in seconds, just add seconds to the unixtime you have.
2. if (your current timestamp >= date you given) { what you want ...}

I think that is what you need
esenrik is offline
CrazY.
Veteran Member
Join Date: May 2015
Location: SP, Brazil
Old 05-20-2018 , 16:20   Re: [ H3LP ] Unix time
Reply With Quote #3

1. get_systime() + (20 minutes * 60 seconds). Ok, I got it.

2. So, loop a task and check as an you've shown. Ok.
__________________








CrazY. is offline
esenrik
Senior Member
Join Date: Jul 2010
Old 05-20-2018 , 16:26   Re: [ H3LP ] Unix time
Reply With Quote #4

Quote:
Originally Posted by CrazY. View Post
1. get_systime() + (20 minutes * 60 seconds). Ok, I got it.

2. So, loop a task and check as an you've shown. Ok.
Exactly.
esenrik 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 04:42.


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