Fx.cs 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. /*
  2. Copyright (c) 2013, 2014 Paolo Patierno
  3. All rights reserved. This program and the accompanying materials
  4. are made available under the terms of the Eclipse Public License v1.0
  5. and Eclipse Distribution License v1.0 which accompany this distribution.
  6. The Eclipse Public License is available at
  7. http://www.eclipse.org/legal/epl-v10.html
  8. and the Eclipse Distribution License is available at
  9. http://www.eclipse.org/org/documents/edl-v10.php.
  10. Contributors:
  11. Paolo Patierno - initial API and implementation and/or initial documentation
  12. ----------------------------------------------------------------------------
  13. Giovanni Paolo Vigano' - preprocessor directives for platform dependent compilation in Unity
  14. */
  15. #if !(!UNITY_EDITOR&&UNITY_WSA_10_0&&!ENABLE_IL2CPP)
  16. using System.Threading;
  17. namespace uPLibrary.Networking.M2Mqtt
  18. {
  19. /// <summary>
  20. /// Support methods fos specific framework
  21. /// </summary>
  22. public class Fx
  23. {
  24. public static void StartThread(ThreadStart threadStart)
  25. {
  26. new Thread(threadStart).Start();
  27. }
  28. public static void SleepThread(int millisecondsTimeout)
  29. {
  30. Thread.Sleep(millisecondsTimeout);
  31. }
  32. }
  33. }
  34. #endif