Пример #1
0
 // Update is called once per frame
 void Update()
 {
     //if (manager.IsConnected) Debug.Log(PupilData.gazePoint);
     if (Input.GetKeyDown(KeyCode.H) & manager.IsConnected)
     {
         var pupilTime = manager.GetTimestamp();
         var time      = Time.timeSinceLevelLoad;
         Debug.Log("Pupil time: " + pupilTime + ". Time of collection: " + time + ". Difference: " + (pupilTime - time));
     }
 }
        /// <summary>
        /// Logs the pupil labs timestamp at the time of an event
        /// </summary>
        /// <param name="eventName">Name of the event during which the timestamp was taken</param>
        public void LogPupilTimestamp(string eventName)
        {
            if (!_manager.IsConnected)
            {
                return;
            }
            var timestamp = _manager.GetTimestamp();

            WriteLine(new List <string> {
                eventName, timestamp.ToString()
            });
        }