diff options
| author | Andrey Lihatskiy <alihatskiy@productengine.com> | 2025-04-10 06:01:50 +0300 | 
|---|---|---|
| committer | Andrey Lihatskiy <alihatskiy@productengine.com> | 2025-04-10 06:01:50 +0300 | 
| commit | 5d7a5001b41df8989cd493433c3dc45459db8240 (patch) | |
| tree | 80012c04f61c56af704e825cf7d2f4e8e3e8625d /indra/llcommon | |
| parent | 2813097aff00d856aa076ade4738a54fe48e25b6 (diff) | |
| parent | 9e24b300d02e5627ea0d304d412cb683ec2de3a4 (diff) | |
Merge commit '9e24b30' into marchcat/maint-c/restore
# Conflicts:
#	indra/llmath/v2math.cpp
#	indra/llmath/v2math.h
#	indra/llmath/v3math.h
#	indra/llmath/v4math.h
#	indra/llui/llfolderviewitem.cpp
#	indra/llui/llfolderviewitem.h
#	indra/llui/llfolderviewmodel.h
#	indra/llui/llmodaldialog.cpp
#	indra/llui/lltexteditor.cpp
#	indra/llui/lltexteditor.h
#	indra/llwindow/llwindowwin32.cpp
#	indra/newview/llagent.cpp
#	indra/newview/llagentcamera.h
#	indra/newview/llavatarrenderinfoaccountant.cpp
#	indra/newview/llconversationmodel.h
#	indra/newview/llfloaterinventorysettings.cpp
#	indra/newview/llfloaternamedesc.cpp
#	indra/newview/llfloaternamedesc.h
#	indra/newview/llfloaterobjectweights.cpp
#	indra/newview/llfloaterobjectweights.h
#	indra/newview/llfolderviewmodelinventory.h
#	indra/newview/llinspecttexture.cpp
#	indra/newview/llinventorybridge.cpp
#	indra/newview/llinventorybridge.h
#	indra/newview/llinventoryfunctions.cpp
#	indra/newview/llinventorygallery.h
#	indra/newview/llinventorygallerymenu.cpp
#	indra/newview/llinventorymodel.cpp
#	indra/newview/llinventorypanel.cpp
#	indra/newview/llinventorypanel.h
#	indra/newview/llmaterialeditor.cpp
#	indra/newview/lloutfitgallery.cpp
#	indra/newview/lloutfitgallery.h
#	indra/newview/lloutfitslist.cpp
#	indra/newview/lloutfitslist.h
#	indra/newview/llpanelgroupcreate.cpp
#	indra/newview/llpanelgroupgeneral.cpp
#	indra/newview/llpanelobjectinventory.cpp
#	indra/newview/llpaneloutfitsinventory.h
#	indra/newview/llpanelprofile.cpp
#	indra/newview/llpanelwearing.cpp
#	indra/newview/llreflectionmap.cpp
#	indra/newview/llselectmgr.cpp
#	indra/newview/llsidepanelappearance.cpp
#	indra/newview/llsidepaneliteminfo.cpp
#	indra/newview/llteleporthistorystorage.cpp
#	indra/newview/lltexturectrl.cpp
#	indra/newview/lltexturectrl.h
#	indra/newview/lltexturefetch.cpp
#	indra/newview/lltexturefetch.h
#	indra/newview/llviewerassetupload.cpp
#	indra/newview/llviewercamera.cpp
#	indra/newview/llviewercamera.h
#	indra/newview/llviewermenufile.cpp
#	indra/newview/llviewerobject.h
#	indra/newview/llviewertexture.cpp
#	indra/newview/llviewerwindow.cpp
#	indra/newview/llvoavatar.cpp
#	indra/newview/llvoavatar.h
#	indra/newview/llvoavatarself.cpp
#	indra/newview/llvovolume.cpp
#	indra/newview/llvovolume.h
#	indra/newview/tests/llviewerassetstats_test.cpp
Diffstat (limited to 'indra/llcommon')
| -rw-r--r-- | indra/llcommon/lldate.cpp | 9 | ||||
| -rw-r--r-- | indra/llcommon/lldate.h | 1 | ||||
| -rw-r--r-- | indra/llcommon/llprocessor.cpp | 8 | ||||
| -rw-r--r-- | indra/llcommon/threadpool.h | 4 | 
4 files changed, 20 insertions, 2 deletions
| diff --git a/indra/llcommon/lldate.cpp b/indra/llcommon/lldate.cpp index b38864688d..5205699b92 100644 --- a/indra/llcommon/lldate.cpp +++ b/indra/llcommon/lldate.cpp @@ -77,6 +77,15 @@ std::string LLDate::asRFC1123() const      return toHTTPDateString (std::string ("%A, %d %b %Y %H:%M:%S GMT"));  } +std::string LLDate::toLocalDateString (std::string fmt) const +{ +    LL_PROFILE_ZONE_SCOPED; + +    time_t locSeconds = (time_t) mSecondsSinceEpoch; +    struct tm * lt = localtime (&locSeconds); +    return toHTTPDateString(lt, fmt); +} +  std::string LLDate::toHTTPDateString (std::string fmt) const  {      LL_PROFILE_ZONE_SCOPED; diff --git a/indra/llcommon/lldate.h b/indra/llcommon/lldate.h index 1a69a04232..ce42e7401a 100644 --- a/indra/llcommon/lldate.h +++ b/indra/llcommon/lldate.h @@ -77,6 +77,7 @@ public:      std::string asRFC1123() const;      void toStream(std::ostream&) const;      bool split(S32 *year, S32 *month = NULL, S32 *day = NULL, S32 *hour = NULL, S32 *min = NULL, S32 *sec = NULL) const; +    std::string toLocalDateString (std::string fmt) const;      std::string toHTTPDateString (std::string fmt) const;      static std::string toHTTPDateString (tm * gmt, std::string fmt);      /** diff --git a/indra/llcommon/llprocessor.cpp b/indra/llcommon/llprocessor.cpp index a783e18e49..2e94651083 100644 --- a/indra/llcommon/llprocessor.cpp +++ b/indra/llcommon/llprocessor.cpp @@ -638,6 +638,14 @@ public:      {          getCPUIDInfo();          uint64_t frequency = getSysctlInt64("hw.cpufrequency"); +        if (!frequency) +        { +            auto tbfrequency = getSysctlInt64("hw.tbfrequency"); +            struct clockinfo clockrate; +            auto clockrate_len = sizeof(clockrate); +            if (!sysctlbyname("kern.clockrate", &clockrate, &clockrate_len, NULL, 0)) +                frequency = tbfrequency * clockrate.hz; +        }          setInfo(eFrequency, (F64)frequency  / (F64)1000000);      } diff --git a/indra/llcommon/threadpool.h b/indra/llcommon/threadpool.h index 0eb1891754..b8be7bb81a 100644 --- a/indra/llcommon/threadpool.h +++ b/indra/llcommon/threadpool.h @@ -4,7 +4,7 @@   * @date   2021-10-21   * @brief  ThreadPool configures a WorkQueue along with a pool of threads to   *         service it. - * + *    * $LicenseInfo:firstyear=2021&license=viewerlgpl$   * Copyright (c) 2021, Linden Research, Inc.   * $/LicenseInfo$ @@ -55,7 +55,7 @@ namespace LL           * ThreadPool listens for application shutdown messages on the "LLApp"           * LLEventPump. Call close() to shut down this ThreadPool early.           */ -        virtual void close(); +        void close();          std::string getName() const { return mName; }          size_t getWidth() const { return mThreads.size(); } | 
