예제 #1
0
    public void Update()
    {
        m_FrameId++;
        if (!m_Started)
        {
            return;
        }

        foreach (var client in m_SoakClients)
        {
            var soakJob = new SoakClientJob
            {
                driver       = client.DriverHandle,
                pipeline     = client.Pipeline,
                connection   = client.ConnectionHandle,
                streamWriter = client.SoakClientStreamWriter,
                serverEP     = client.ServerEndPoint,
                pendingSoaks = client.PendingSoakMessages,
                fixedTime    = Time.fixedTime,

                deltaTime = Time.fixedDeltaTime,
                frameId   = m_FrameId,
                timestamp = System.Diagnostics.Stopwatch.GetTimestamp() / TimeSpan.TicksPerMillisecond,

                packetData    = client.SoakJobDataPacket,
                jobContext    = client.SoakJobContextsHandle,
                jobStatistics = client.SoakStatisticsHandle
            };

            client.UpdateHandle = client.DriverHandle.ScheduleUpdate();
            client.UpdateHandle = soakJob.Schedule(client.UpdateHandle);
        }
    }
예제 #2
0
    public void Update()
    {
        m_FrameId++;
        if (!m_Started)
        {
            return;
        }

        foreach (var client in m_SoakClients)
        {
            var soakJob = new SoakClientJob
            {
                driver       = client.DriverHandle,
                connection   = client.ConnectionHandle,
                streamWriter = client.SoakClientStreamWriter,
                serverEP     = client.ServerEndPoint,
                pendingSoaks = client.PendingSoakMessages,
                fixedTime    = Time.fixedTime,

                deltaTime = Time.fixedDeltaTime,
                frameId   = m_FrameId,

                packetData    = client.SoakJobDataPacket,
                jobContext    = client.SoakJobContextsHandle,
                jobStatistics = client.SoakStatisticsHandle
            };

            client.UpdateHandle = client.DriverHandle.ScheduleUpdate();
            client.UpdateHandle = soakJob.Schedule(client.UpdateHandle);
        }
    }