kazurayam / materialstore

A domain-specific file system to store "materials" (screenshots, HTML, JSON, XML) collected during End-to-End testings using Selenium WebDriver etc. Features to make "diff" and compiling HTML reports are also included. This is written in pure Java8
Apache License 2.0
0 stars 0 forks source link

int JobTimestamp.getSecond() is required #344

Closed kazurayam closed 1 year ago

kazurayam commented 1 year ago

I want to write a code that depends on the value of JobTimestamp given. If the Second is even, the do this, If the Second is odd, then do that, ...

So I need JobTimestamp object to support int getSecond() method.

kazurayam commented 1 year ago

Not necessary to add int getSecond() method to the JobTimestamp class.

Instead, do this:

JobTimestamp jt = JobTimestamp.now()

if (jt.value().getSecond() % 2 == 0) {
    doThis();
} else {
    doThat();
}