Here are the state of composite with the use of clock.unix_timestamps and time, the introduced instruction.
** Auspicion
Consideration of replications or conduits candidates, you should be killed that they will start before, as the candidate can be added. However, if there is some kind of problems with the srake, it can be difficult, rightly, the proclaim was initiated.
In this state, we disperse, how to make competitions of the interde with cloc.unix_timestamps and at the time, the arguments submitted by instruction.
** What is the Unix Timestamp?
Unix Timestamp – This is a different amount of seconds that passed with 1 Janvar 1970, at 00:00 UTC. It can be attached, using the function of date.now () or the method ‘unixtimestamp ()’ on the object date '.
CLOCK.UNIX_TIMESTAMPS IN SOLDNY
In the solidnost you can get the tight time of Unix, using the following syntax:
The focus
Const Unixtimestamp = Date.now () / 1000;
This is the impact of the cellaring of the number of seconds with 1 Janvar 1970 at 00:00 UTC.
Auspication of the Unix
To make two tricky metons unix, you can use the following functions:
CLOCK.UNIX_TIMESTAMPS
`The focus
Const Unixtimestamp1 = Clock.unix_timestamps ();
Const Unixtimestamp2 = instruction.arg (0) .Unixtimestamp ();
IF (Unixtimestamp1
// Was the Oproce Beginning
} ELSE IF (Unixtimestamp1> Unixtimestamp2) {
// APPOSS IS NOT ONLY PROVIDED
} Still {
// Oproce's Oproce Opus Odno.
}
CLOCK.UNIX_TIMESTAMPS (0)(Solidity 0.4.x and wound)
`The focus
Const Unixtimestamp1 = Clock.unix_timestamps (0);
Const Unixtimestamp2 = instruction.arg (0) .Unixtimestamp ();
IF (Unixtimestamp1
// Was the Oproce Beginning
} ELSE IF (Unixtimestamp1> Unixtimestamp2) {
// APPOSS IS NOT ONLY PROVIDED
} Still {
// Oproce's Oproce Opus Odno.
}
Using Trances.arg (0) .Unixtimestamp ()
In the qualities of the Alternative you can use TRANCES.ARG (0) .Unixtimestamp () to the time of the Unix Instruction, which initiated the procedure. This is when you need to do it with a fixed time.
For example:
`The focus
Const Unixtimestamp1 = instruction.arg (0) .Unixtimestamp ();
Const Unixtimestamp2 = clock.unix_timestamps ();
IF (Unixtimestamp1
// Was the Oproce Beginning
} ELSE IF (Unixtimestamp1> Unixtimestamp2) {
// APPOSS NOT ONLY BRICE
} Still {
// Opus Oproce Opus Odnuly
}
conclusion
In the conclusion, the conduction of the inheritance of the interdealed clock.unix_timestamps and the time conducted with the help of instruction. Using one of these functions, you can kill that your accuras is inaniabially and to enter into the inhibition of candidates.
Holly, this is helpful! Let me know, if you have a number -liking questioning or you need to be addicted.