function UpdateMoney() public
    {
        require(miners[msg.sender].lastUpdateTime != 0);
        
        MinerData storage m = miners[msg.sender];
        uint diff = block.timestamp - m.lastUpdateTime;
        uint revenue = GetProductionPerSecond(msg.sender);
   
        m.lastUpdateTime = block.timestamp;
        if(revenue > 0)
        {
            revenue *= diff;
            
            m.money += revenue;
        }
    }