tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

timer-inl.h (1450B)


      1 // Copyright 2023 Google LLC
      2 // SPDX-License-Identifier: Apache-2.0
      3 //
      4 // Licensed under the Apache License, Version 2.0 (the "License");
      5 // you may not use this file except in compliance with the License.
      6 // You may obtain a copy of the License at
      7 //
      8 //      http://www.apache.org/licenses/LICENSE-2.0
      9 //
     10 // Unless required by applicable law or agreed to in writing, software
     11 // distributed under the License is distributed on an "AS IS" BASIS,
     12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     13 // See the License for the specific language governing permissions and
     14 // limitations under the License.
     15 
     16 // DEPRECATED, use timer.h instead.
     17 
     18 #include "hwy/timer.h"
     19 
     20 #if defined(HIGHWAY_HWY_TIMER_INL_H_) == defined(HWY_TARGET_TOGGLE)
     21 #ifdef HIGHWAY_HWY_TIMER_INL_H_
     22 #undef HIGHWAY_HWY_TIMER_INL_H_
     23 #else
     24 #define HIGHWAY_HWY_TIMER_INL_H_
     25 #endif
     26 
     27 #include "hwy/highway.h"
     28 
     29 HWY_BEFORE_NAMESPACE();
     30 namespace hwy {
     31 namespace HWY_NAMESPACE {
     32 namespace timer {
     33 
     34 // Deprecated aliases so that old code still compiles. Prefer to use
     35 // `hwy::timer::*` from timer.h because that does not require highway.h.
     36 using Ticks = hwy::timer::Ticks;
     37 
     38 inline Ticks Start() { return hwy::timer::Start(); }
     39 inline Ticks Stop() { return hwy::timer::Stop(); }
     40 
     41 }  // namespace timer
     42 
     43 // NOLINTNEXTLINE(google-readability-namespace-comments)
     44 }  // namespace HWY_NAMESPACE
     45 }  // namespace hwy
     46 HWY_AFTER_NAMESPACE();
     47 
     48 #endif  // per-target include guard