package com.its.vms.xnettcp.vms.process;

import com.its.vms.xnettcp.vms.protocol.enums.eVmsOpCode;
import lombok.Getter;
import lombok.Setter;

@Getter
@Setter
public class TcpServerSendData {

    private long requestTime;
    private eVmsOpCode opCode;
    private Object data;

    public TcpServerSendData(eVmsOpCode opCode, Object data) {
        this.requestTime = System.currentTimeMillis();
        this.opCode = opCode;
        this.data = data;
    }

    public long elapsed() {
        return System.currentTimeMillis() - this.requestTime;
    }

}
