Path: blob/master/thirdparty/metal-cpp/Foundation/NSDate.hpp
21066 views
//-------------------------------------------------------------------------------------------------------------------------------------------------------------1//2// Foundation/NSDate.hpp3//4// Copyright 2020-2024 Apple Inc.5//6// Licensed under the Apache License, Version 2.0 (the "License");7// you may not use this file except in compliance with the License.8// You may obtain a copy of the License at9//10// http://www.apache.org/licenses/LICENSE-2.011//12// Unless required by applicable law or agreed to in writing, software13// distributed under the License is distributed on an "AS IS" BASIS,14// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.15// See the License for the specific language governing permissions and16// limitations under the License.17//18//-------------------------------------------------------------------------------------------------------------------------------------------------------------192021#pragma once2223//-------------------------------------------------------------------------------------------------------------------------------------------------------------2425#include "NSDefines.hpp"26#include "NSObject.hpp"27#include "NSPrivate.hpp"28#include "NSTypes.hpp"2930//-------------------------------------------------------------------------------------------------------------------------------------------------------------3132namespace NS33{3435using TimeInterval = double;3637class Date : public Copying<Date>38{39public:40static Date* dateWithTimeIntervalSinceNow(TimeInterval secs);41};4243} // NS4445//-------------------------------------------------------------------------------------------------------------------------------------------------------------4647_NS_INLINE NS::Date* NS::Date::dateWithTimeIntervalSinceNow(NS::TimeInterval secs)48{49return NS::Object::sendMessage<NS::Date*>(_NS_PRIVATE_CLS(NSDate), _NS_PRIVATE_SEL(dateWithTimeIntervalSinceNow_), secs);50}5152//-------------------------------------------------------------------------------------------------------------------------------------------------------------5354