public void UpdateSongOffset()
 {
     if (!timeSync)
     {
         timeSync = Resources.FindObjectsOfTypeAll <AudioTimeSyncController>().First();
     }
     else
     {
         if ((timeSync.songLength - timeSync.songTime) > 30)
         {
             SteamAPI.SetSongOffset(timeSync.songTime);
         }
         else
         {
             SteamAPI.SetSongOffset(0f);
             CancelInvoke("UpdateSongOffset");
         }
     }
 }
        IEnumerator RunLobbyCleanup()
        {
            yield return(new WaitUntil(delegate() { return true; }));

            Logger.Debug("Finished song, doing cleanup");
            try
            {
                WaitingMenu.Instance.Dismiss();
            } catch (Exception e)
            {
                Logger.Error($"Error dismissing WaitingMenu {e}");
            }
            WaitingMenu.firstInit  = true;
            WaitingMenu.queuedSong = null;
            WaitingMenu.autoReady  = false;
            SongListUtils.InSong   = false;
            Controllers.PlayerController.Instance._playerInfo.InSong = false;
            SteamAPI.SetSongOffset(0f);
            CancelInvoke("UpdateSongOffset");
            SteamAPI.FinishSong();
        }