module ietf-lime-time-types {
  yang-version 1.1;
  namespace "urn:ietf:params:xml:ns:yang:ietf-lime-time-types";
  prefix "lime"; lime;

  organization
    "IETF LIME Working Group";
  contact
    "WG Web:   <https://datatracker.ietf.org/wg/lime>
     WG List:  <mailto:lmap@ietf.org>

     Editor:   Qin Wu
               <bill.wu@huawei.com>";
  description
    "This module provides time-related definitions used by the data
     models written for Layer Independent OAM Management in the
     Multi-Layer Environment (LIME).  This module defines
     identities but no schema tree elements.

     Copyright (c) 2019 IETF Trust and the persons identified as
     authors of the code.  All rights reserved.

     Redistribution and use in source and binary forms, with or
     without modification, is permitted pursuant to, and subject
     to the license terms contained in, the Simplified BSD License
     set forth in Section 4.c of the IETF Trust's Legal Provisions
     Relating to IETF Documents
     (http://trustee.ietf.org/license-info).

     This version of this YANG module is part of RFC 8532; see
     the RFC itself for full legal notices.";

  revision "2019-02-04" 2019-03-11 {
    description
      "Initial version.";
    reference
      "RFC 8532: Generic YANG Data Model for the Management of
       Operations, Administration, and Maintenance (OAM) Protocols
       That Use Connectionless Communications";
  }

  /*** Collection of common types related to time ***/
  /*** Time unit identity ***/

  identity time-unit-type {
    description
      "Time unit type.";
  }

  identity hours {
    base time-unit-type;
    description
      "Time unit in hours.";
  }

  identity minutes {
    base time-unit-type;
    description
      "Time unit in minutes.";
  }

  identity seconds {
    base time-unit-type;
    description
      "Time unit in seconds.";
  }

  identity milliseconds {
    base time-unit-type;
    description
      "Time unit in milliseconds.";
  }

  identity microseconds {
    base time-unit-type;
    description
      "Time unit in microseconds.";
  }

  identity nanoseconds {
    base time-unit-type;
    description
      "Time unit in nanoseconds.";
  }

  /*** Timestamp format Identity ***/

  identity timestamp-type {
    description
      "Base identity for Timestamp Type.";
  }

  identity truncated-ptp {
    base timestamp-type;
    description
      "Identity for 64-bit short-format PTP timestamp.";
  }

  identity truncated-ntp {
    base timestamp-type;
    description
      "Identity for 32-bit short-format NTP timestamp.";
  }
  identity ntp64 {
    base timestamp-type;
    description
      "Identity for 64-bit NTP timestamp.";
  }

  identity icmp {
    base timestamp-type;
    description
      "Identity for 32-bit ICMP timestamp.";
  }

  identity ptp80 {
    base timestamp-type;
    description
      "Identity for 80-bit PTP timestamp.";
  }
}