FOperatingSystemRangeTime
#include <OperatingSystemSimulator/Public/OperatingSystemRangeTime.h>Class detail
Section titled “Class detail”---
config:
class:
hideEmptyMembersBox: true
---
classDiagram
class FOperatingSystemRangeTime {
+IsValid() const bool
+GetTime(const float FallbackTime=1.f) const float
+FOperatingSystemRangeTime()
+FOperatingSystemRangeTime(const float &MinTime, const float &MaxTime)
+MinTime : float
+MaxTime : float
}
Caller impact — GetTime
Section titled “Caller impact — GetTime”Documented call sites inside the plugin (7):
flowchart LR FOperatingSystemRangeTime__GetTime["FOperatingSystemRangeTime::GetTime"] UOperatingSystemBaseDevice__DeviceCreated["UOperatingSystemBaseDevice::DeviceCreated"] UOperatingSystemBaseDevice__DeviceCreated --> FOperatingSystemRangeTime__GetTime UOperatingSystem__GetInitialLoadingTime["UOperatingSystem::GetInitialLoadingTime"] UOperatingSystem__GetInitialLoadingTime --> FOperatingSystemRangeTime__GetTime UOperatingSystem__GetInstallationTime["UOperatingSystem::GetInstallationTime"] UOperatingSystem__GetInstallationTime --> FOperatingSystemRangeTime__GetTime UOperatingSystem__GetLoadingTime["UOperatingSystem::GetLoadingTime"] UOperatingSystem__GetLoadingTime --> FOperatingSystemRangeTime__GetTime UOperatingSystemStatics__GetRangeTime["UOperatingSystemStatics::GetRangeTime"] UOperatingSystemStatics__GetRangeTime --> FOperatingSystemRangeTime__GetTime UOperatingSystemBaseDevice__Internal_OnDeviceSessionEnd["UOperatingSystemBaseDevice::Internal_OnDeviceSessionEnd"] UOperatingSystemBaseDevice__Internal_OnDeviceSessionEnd --> FOperatingSystemRangeTime__GetTime UOperatingSystemGameSubsystem__RequestFundsFromBank["UOperatingSystemGameSubsystem::RequestFundsFromBank"] UOperatingSystemGameSubsystem__RequestFundsFromBank --> FOperatingSystemRangeTime__GetTime
struct FOperatingSystemRangeTimeDefined in OperatingSystemRangeTime.h:26 Represents a range of time for an operating system.
An instance of this class contains a minimum time and a maximum time, both measured in seconds. The minimum time must be greater than or equal to zero and less than or equal to the maximum time. The maximum time must be greater than zero and greater than or equal to the minimum time.
The methods available in this class allow you to check if the range is valid and obtain a random time within the range.
Example usage:
FOperatingSystemRangeTime RangeTime(5.f, 10.f);if (RangeTime.IsValid()){ float RandomTime = RangeTime.GetTime(); // Use the random time within the range}Public Methods
Section titled “Public Methods”| Return | Name | Description |
|---|---|---|
bool | IsValid const inline | Checks if the range of time is valid. |
float | GetTime const inline | Returns a random time within the range of MinTime to MaxTime. If the range is not valid, it returns the FallbackTime parameter value. If the fallback time is less than 0.0001 then return 1.f. |
FOperatingSystemRangeTime inline | Default constructor for the FOperatingSystemRangeTime class. | |
FOperatingSystemRangeTime inline | Creates a new instance of FOperatingSystemRangeTime with the specified minimum and maximum times. |
IsValid
Section titled “IsValid”const inline
inline bool IsValid() constDefined in OperatingSystemRangeTime.h:52 Checks if the range of time is valid.
The range of time is considered valid if the following conditions are met:
-
MinTime is greater than or equal to 0.
-
MaxTime is greater than UE_KINDA_SMALL_NUMBER.
-
MinTime is less than or equal to MaxTime.
Returns
Section titled “Returns”True if the range of time is valid, false otherwise.
Referenced by
Section titled “Referenced by”GetTime
Section titled “GetTime”const inline
inline float GetTime(const float FallbackTime = 1.f) constDefined in OperatingSystemRangeTime.h:62 Returns a random time within the range of MinTime to MaxTime. If the range is not valid, it returns the FallbackTime parameter value. If the fallback time is less than 0.0001 then return 1.f.
Parameters
Section titled “Parameters”FallbackTimeThe fallback time to return if the range is not valid. Default is 1.f.
Returns
Section titled “Returns”A random time within the range of MinTime to MaxTime, or the fallback time if the range is not valid.
Referenced by
Section titled “Referenced by”DeviceCreatedGetInitialLoadingTimeGetInstallationTimeGetLoadingTimeGetRangeTimeInternal_OnDeviceSessionEndRequestFundsFromBank
FOperatingSystemRangeTime
Section titled “FOperatingSystemRangeTime”inline
inline FOperatingSystemRangeTime()Defined in OperatingSystemRangeTime.h:77 Default constructor for the FOperatingSystemRangeTime class.
Initializes the MinTime to 0 and the MaxTime to 1.
FOperatingSystemRangeTime
Section titled “FOperatingSystemRangeTime”inline
inline FOperatingSystemRangeTime(const float & MinTime, const float & MaxTime)Defined in OperatingSystemRangeTime.h:89 Creates a new instance of FOperatingSystemRangeTime with the specified minimum and maximum times.
Parameters
Section titled “Parameters”-
MinTimeThe minimum time (in seconds) for the range. Must be >= 0 and <= MaxTime. -
MaxTimeThe maximum time (in seconds) for the range. Must be > 0 and >= MinTime.
Private Attributes
Section titled “Private Attributes”| Return | Name | Description |
|---|---|---|
float | MinTime | Min time (in seconds) to calculate time. Must be >= 0 and <= MaxTime |
float | MaxTime | Max time (in seconds) to calculate time. Must be > 0 and >= MinTime |
MinTime
Section titled “MinTime”float MinTimeDefined in OperatingSystemRangeTime.h:34 Min time (in seconds) to calculate time. Must be >= 0 and <= MaxTime
MaxTime
Section titled “MaxTime”float MaxTimeDefined in OperatingSystemRangeTime.h:38 Max time (in seconds) to calculate time. Must be > 0 and >= MinTime