llcommon.cpp 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. /**
  2. * @file llcommon.cpp
  3. *
  4. * $LicenseInfo:firstyear=2006&license=viewergpl$
  5. *
  6. * Copyright (c) 2006-2009, Linden Research, Inc.
  7. *
  8. * Second Life Viewer Source Code
  9. * The source code in this file ("Source Code") is provided by Linden Lab
  10. * to you under the terms of the GNU General Public License, version 2.0
  11. * ("GPL"), unless you have obtained a separate licensing agreement
  12. * ("Other License"), formally executed by you and Linden Lab. Terms of
  13. * the GPL can be found in doc/GPL-license.txt in this distribution, or
  14. * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
  15. *
  16. * There are special exceptions to the terms and conditions of the GPL as
  17. * it is applied to this Source Code. View the full text of the exception
  18. * in the file doc/FLOSS-exception.txt in this software distribution, or
  19. * online at
  20. * http://secondlifegrid.net/programs/open_source/licensing/flossexception
  21. *
  22. * By copying, modifying or distributing this software, you acknowledge
  23. * that you have read and understood your obligations described above,
  24. * and agree to abide by those obligations.
  25. *
  26. * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
  27. * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
  28. * COMPLETENESS OR PERFORMANCE.
  29. * $/LicenseInfo$
  30. */
  31. #include "linden_common.h"
  32. #include "llcommon.h"
  33. #include "llapr.h"
  34. #include "lltimer.h"
  35. //static
  36. bool LLCommon::sAprInitialized = false;
  37. //static
  38. void LLCommon::initClass()
  39. {
  40. if (!sAprInitialized)
  41. {
  42. ll_init_apr();
  43. sAprInitialized = true;
  44. }
  45. LLTimer::initClass();
  46. }
  47. //static
  48. void LLCommon::cleanupClass()
  49. {
  50. LLTimer::cleanupClass();
  51. if (sAprInitialized)
  52. {
  53. ll_cleanup_apr();
  54. sAprInitialized = false;
  55. }
  56. }