Documentation ¶
Overview ¶
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
- Constants
- func ComputNextHourTimeMillis() int64
- func ComputNextMinutesTimeMillis() int64
- func ComputNextMorningTimeMillis() int64
- func CurrentTimeMillis() int64
- func ExitNotify(fn func(os.Signal))
- func Home() string
- func IsWindowsOS() bool
- func MilliTime2String(millisecond int64) string
- func UnixHome() string
- func WindowsHome() string
- type Notify
- type Ticker
- type Tickers
- type WaitNotify
Constants ¶
const (
TIMEFORMAT = "2006-01-02 15:04:05"
)
const (
WINDOWS = "windows" // windows operating system
)
Variables ¶
This section is empty.
Functions ¶
func ComputNextHourTimeMillis ¶
func ComputNextHourTimeMillis() int64
ComputNextHourTimeMillis 下一整点小时(分、秒、毫秒置为0) Author rongzhihong Since 2017/9/5
func ComputNextMinutesTimeMillis ¶
func ComputNextMinutesTimeMillis() int64
ComputNextMinutesTimeMillis 下一整点分钟(秒、毫秒置为0) Author rongzhihong Since 2017/9/5
func ComputNextMorningTimeMillis ¶
func ComputNextMorningTimeMillis() int64
ComputNextMorningTimeMillis 下一整点天(时、分、秒、毫秒置为0) Author rongzhihong Since 2017/9/5
func CurrentTimeMillis ¶
func CurrentTimeMillis() int64
CurrentTimeMillis 当前时间毫秒数 Author rongzhihong Since 2017/9/5
func ExitNotify ¶
func IsWindowsOS ¶
func IsWindowsOS() bool
IsWindowsOS check current os is windows if current is windows operating system, return true ; otherwise return false Author rongzhihong Since 2017/9/8
func MilliTime2String ¶
MillsTime2String 将毫秒时间转为字符时间 Author: rongzhihong Since: 2017/9/19
func WindowsHome ¶
func WindowsHome() string
Types ¶
type Notify ¶
type Notify struct {
// contains filtered or unexported fields
}
Notify 唤醒Goroutine
func (*Notify) Signal ¶
func (n *Notify) Signal()
Signal wakes one goroutine waiting on c, if there is any.
func (*Notify) WaitTimeout ¶
WaitTimeout cannot return unless awoken by Signal or timeout.
type Tickers ¶
type Tickers struct {
// contains filtered or unexported fields
}
Tickers 定时器管理
type WaitNotify ¶
type WaitNotify struct {
// contains filtered or unexported fields
}
WaitNotify 用来做线程之间异步通知 Author zhoufei Since 2017/10/23
func NewWaitNotify ¶
func NewWaitNotify() *WaitNotify
func (*WaitNotify) WaitForRunning ¶
func (wno *WaitNotify) WaitForRunning(interval int64)
func (*WaitNotify) Wakeup ¶
func (wno *WaitNotify) Wakeup(interval int64)