diff --git a/n2s3/src/main/scala/fr/univ_lille/cristal/emeraude/n2s3/core/GlobalTimestamp.scala b/n2s3/src/main/scala/fr/univ_lille/cristal/emeraude/n2s3/core/GlobalTimestamp.scala index 6f0a57f2bf13e1db63d73cdd71693242b349c415..a9e451f6238323e8b38a1027b0c45772c2ab175b 100644 --- a/n2s3/src/main/scala/fr/univ_lille/cristal/emeraude/n2s3/core/GlobalTimestamp.scala +++ b/n2s3/src/main/scala/fr/univ_lille/cristal/emeraude/n2s3/core/GlobalTimestamp.scala @@ -1,28 +1,28 @@ -/************************************************************************************************************ - * Contributors: - * - created by Pierre Falez on 10/05/16. - ***********************************************************************************************************/ +/** ********************************************************************************************************** + * Contributors: + * - created by Pierre Falez on 10/05/16. + * **********************************************************************************************************/ package fr.univ_lille.cristal.emeraude.n2s3.core import fr.univ_lille.cristal.emeraude.n2s3.core.GlobalTypesAlias.Timestamp import fr.univ_lille.cristal.emeraude.n2s3.support.actors.Message class GlobalTimestamp { - var timestamp : Timestamp = 0 + var timestamp: Timestamp = 0 } trait TimestampGenerator { - var currentMaxTimestamp : Timestamp = 0 + var currentMaxTimestamp: Timestamp = 0 - def getGlobalTimestamp : GlobalTimestamp + def getGlobalTimestamp: GlobalTimestamp - def toGlobalTimestamp(rawTimestamp : Timestamp) : Timestamp = { - currentMaxTimestamp = math.max(rawTimestamp, currentMaxTimestamp) - getGlobalTimestamp.timestamp+rawTimestamp - } + def toGlobalTimestamp(rawTimestamp: Timestamp): Timestamp = { + currentMaxTimestamp = math.max(rawTimestamp, currentMaxTimestamp) + getGlobalTimestamp.timestamp + rawTimestamp + } -def endOfStage() : Unit = { - getGlobalTimestamp.timestamp += currentMaxTimestamp - currentMaxTimestamp = 0 -} + def endOfStage(): Unit = { + getGlobalTimestamp.timestamp += currentMaxTimestamp + currentMaxTimestamp = 0 + } } \ No newline at end of file