[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[sc-dev] [supercollider/supercollider] 124247: lang: Add monotonicClockTime primitive



  Branch: refs/heads/topic/timing-cleanup
  Home:   https://github.com/supercollider/supercollider
  Commit: 1242477b7d6ce5d473f3a580e3634ac1a51eb4d4
      https://github.com/supercollider/supercollider/commit/1242477b7d6ce5d473f3a580e3634ac1a51eb4d4
  Author: Scott Wilson <i@xxxxxxxxxxxxxx>
  Date:   2014-12-22 (Mon, 22 Dec 2014)

  Changed paths:
    M SCClassLibrary/Common/Core/Kernel.sc
    M lang/LangPrimSource/PyrSched.cpp
    M lang/LangSource/PyrSched.h

  Log Message:
  -----------
  lang: Add monotonicClockTime primitive

Allow users to access the highest resolution monotonic clock time directly. This is useful for synchronisation applications like EspGrid.

Signed-off-by: Scott Wilson <i@xxxxxxxxxxxxxx>


  Commit: 9644b0f3b0c95e22906a58ce053cd006d69589ed
      https://github.com/supercollider/supercollider/commit/9644b0f3b0c95e22906a58ce053cd006d69589ed
  Author: Scott Wilson <i@xxxxxxxxxxxxxx>
  Date:   2014-12-26 (Fri, 26 Dec 2014)

  Changed paths:
    M lang/LangPrimSource/PyrSched.cpp
    M lang/LangSource/GC.cpp
    M lang/LangSource/PyrLexer.cpp
    M lang/LangSource/PyrObject.cpp
    M lang/LangSource/PyrSched.h

  Log Message:
  -----------
  lang: Unify time and scheduling approach across platforms

- standardise Main:elapsedTime across all platforms: use chrono::high_resolution_clock on all platforms. Windows and Linux reported elapsedTime as time since epoch rather than time since lang start. This is bad because it is inconsistent, misleading, and because time since epoch is usually from 1/1/1970, considerable resolution was lost when converted to seconds as a float. This has been corrected to match the original Mac behaviour.
- correct for drift against timeofday on all platforms
- remove elapsedRealTime(): This is now the same as elapsedTime, and was only used for calculating compile and init times. (Why was that more precise than lang scheduling?)

Signed-off-by: Scott Wilson <i@xxxxxxxxxxxxxx>


  Commit: 3e2a0eb00aa39a3b43526ccd0e741c8260ac04a6
      https://github.com/supercollider/supercollider/commit/3e2a0eb00aa39a3b43526ccd0e741c8260ac04a6
  Author: Scott Wilson <i@xxxxxxxxxxxxxx>
  Date:   2014-12-26 (Fri, 26 Dec 2014)

  Changed paths:
    M lang/LangPrimSource/PyrSched.cpp

  Log Message:
  -----------
  lang: SystemClock schedules on high_resolution_clock rather than system_clock

- Also avoid unnecessary conversions and schedule on clock directly

Signed-off-by: Scott Wilson <i@xxxxxxxxxxxxxx>


  Commit: 32a8dd85b9406c8409bf2ba78c9a2f1bbff35266
      https://github.com/supercollider/supercollider/commit/32a8dd85b9406c8409bf2ba78c9a2f1bbff35266
  Author: Scott Wilson <i@xxxxxxxxxxxxxx>
  Date:   2014-12-26 (Fri, 26 Dec 2014)

  Changed paths:
    M lang/LangPrimSource/PyrSched.cpp

  Log Message:
  -----------
  lang: TempoClock schedules on high_resolution clock

Signed-off-by: Scott Wilson <i@xxxxxxxxxxxxxx>


  Commit: 07f6872c6140b9a65cf4b6ffece4e2928ea75886
      https://github.com/supercollider/supercollider/commit/07f6872c6140b9a65cf4b6ffece4e2928ea75886
  Author: Scott Wilson <i@xxxxxxxxxxxxxx>
  Date:   2014-12-26 (Fri, 26 Dec 2014)

  Changed paths:
    M lang/LangPrimSource/PyrSched.cpp

  Log Message:
  -----------
  lang: use high_resolution_clock native duration

Signed-off-by: Scott Wilson <i@xxxxxxxxxxxxxx>


  Commit: 866a76893bfac66ec977b40f4edb194d4d707791
      https://github.com/supercollider/supercollider/commit/866a76893bfac66ec977b40f4edb194d4d707791
  Author: Scott Wilson <i@xxxxxxxxxxxxxx>
  Date:   2014-12-26 (Fri, 26 Dec 2014)

  Changed paths:
    M lang/LangSource/PyrInterpreter3.cpp

  Log Message:
  -----------
  lang: Remove remaining lang dependancy on boost::chrono; use std::chrono instead

Signed-off-by: Scott Wilson <i@xxxxxxxxxxxxxx>


  Commit: 95a660406d9f45cb9c6e44c308ae2fcda09cca62
      https://github.com/supercollider/supercollider/commit/95a660406d9f45cb9c6e44c308ae2fcda09cca62
  Author: Scott Wilson <i@xxxxxxxxxxxxxx>
  Date:   2014-12-26 (Fri, 26 Dec 2014)

  Changed paths:
    M server/scsynth/SC_CoreAudio.cpp

  Log Message:
  -----------
  scsynth: For core audio update syncOSCOffsetWithTimeOfDay to match lang implementation

Signed-off-by: Scott Wilson <i@xxxxxxxxxxxxxx>


Compare: https://github.com/supercollider/supercollider/compare/1242477b7d6c^...95a660406d9f