calculateOnlineTime 0.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/lib/calculateOnlineTime.rb +13 -0
- metadata +43 -0
checksums.yaml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: 1dc709ee2f19f57d9fb2e0fb4204feade492a6a47929db9e87aba03e3b62f6fd
|
|
4
|
+
data.tar.gz: bae9874db4d993c6dc976aee93b59d7cefa139572e12d5ecac6e5c795254d14c
|
|
5
|
+
SHA512:
|
|
6
|
+
metadata.gz: 13618c9f80623e919f5f473bd39e141ac9c231aacebd33365812d2ee1ee0df020d15f3b0628d6e5d389292677ee6099a05992b05eb451a7995a6b8ceed15e086
|
|
7
|
+
data.tar.gz: 267b9fb7f9d56a10b43f2929c25db5a52b2aeabdae399a80a1bb208543e2585aa0e0ea092641d1d013a6e4ed81bcb6c764e13b0c4be9f54293e72aba57e5762a
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
module OnlineTime
|
|
2
|
+
def self.set_online_time(last_login_in,previous_online_time)
|
|
3
|
+
|
|
4
|
+
start_time = last_login_in
|
|
5
|
+
end_time = Time.now;
|
|
6
|
+
|
|
7
|
+
if start_time && end_time
|
|
8
|
+
minutes = (start_time - end_time) / 60
|
|
9
|
+
minutes = previous_online_time + minutes
|
|
10
|
+
return minutes
|
|
11
|
+
end
|
|
12
|
+
end
|
|
13
|
+
end
|
metadata
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
|
2
|
+
name: calculateOnlineTime
|
|
3
|
+
version: !ruby/object:Gem::Version
|
|
4
|
+
version: 0.0.0
|
|
5
|
+
platform: ruby
|
|
6
|
+
authors:
|
|
7
|
+
- Akhilesh Selvaraj
|
|
8
|
+
autorequire:
|
|
9
|
+
bindir: bin
|
|
10
|
+
cert_chain: []
|
|
11
|
+
date: 2020-04-19 00:00:00.000000000 Z
|
|
12
|
+
dependencies: []
|
|
13
|
+
description: returns online time by adding current online time with previous online
|
|
14
|
+
time.
|
|
15
|
+
email: akhiselva@gmail.com
|
|
16
|
+
executables: []
|
|
17
|
+
extensions: []
|
|
18
|
+
extra_rdoc_files: []
|
|
19
|
+
files:
|
|
20
|
+
- lib/calculateOnlineTime.rb
|
|
21
|
+
homepage: http://rubygems.org/gems/calculateOnlineTime
|
|
22
|
+
licenses: []
|
|
23
|
+
metadata: {}
|
|
24
|
+
post_install_message:
|
|
25
|
+
rdoc_options: []
|
|
26
|
+
require_paths:
|
|
27
|
+
- lib
|
|
28
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
|
29
|
+
requirements:
|
|
30
|
+
- - ">="
|
|
31
|
+
- !ruby/object:Gem::Version
|
|
32
|
+
version: '0'
|
|
33
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
34
|
+
requirements:
|
|
35
|
+
- - ">="
|
|
36
|
+
- !ruby/object:Gem::Version
|
|
37
|
+
version: '0'
|
|
38
|
+
requirements: []
|
|
39
|
+
rubygems_version: 3.1.2
|
|
40
|
+
signing_key:
|
|
41
|
+
specification_version: 4
|
|
42
|
+
summary: Calculates onlinetime
|
|
43
|
+
test_files: []
|