Scheduler for Pseudonym Pairs

in pseudonympairs •  5 years ago 
    uint pseudonymEvent = 1578726000;
    uint hour;

    uint[] clockwork;

    function eventScheduler() internal {

    pseudonymEvent += 28 days;

        if(clockwork.length == 0) {
            for(uint i = 0; i<24; i++) {
                clockwork.length++;
                clockwork[i] = i;
            }
        }

        uint random = getRandomNumber()% clockwork.length;
        hour = clockwork[random];
        clockwork[random] = clockwork[clockwork.length-1];
        clockwork.length--;
    }
Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!
Sort Order:  

thanks for sharing all your great stuff :)