mirror of
https://github.com/gnosygnu/xowa.git
synced 2026-03-02 03:49:30 +00:00
'v3.8.1.1'
This commit is contained in:
@@ -29,12 +29,12 @@ public class DateAdp_ implements Gfo_invk {
|
||||
public static final String Cls_ref_name = "Date";
|
||||
public static final Class<?> Cls_ref_type = DateAdp.class;
|
||||
public Object Invk(GfsCtx ctx, int ikey, String k, GfoMsg m) {
|
||||
if (ctx.Match(k, Invk_Now)) return Now();
|
||||
if (ctx.Match(k, Invk_Now)) return Datetime_now.Get();
|
||||
else return Gfo_invk_.Rv_unhandled;
|
||||
} public static final String Invk_Now = "Now";
|
||||
public static final DateAdp MinValue = new DateAdp( 1, 1, 1, 0, 0, 0, 0);
|
||||
public static final DateAdp MaxValue = new DateAdp(9999, 12, 31, 23, 59, 59, 999);
|
||||
public static DateAdp Now() {return Tfds.Now_enabled() ? Tfds.Now() : new DateAdp(new GregorianCalendar());}
|
||||
// public static DateAdp Now() {return Tfds.Now_enabled() ? Tfds.Now() : new DateAdp(new GregorianCalendar());}
|
||||
public static DateAdp new_(int year, int month, int day, int hour, int minute, int second, int frac) {return new DateAdp(year, month, day, hour, minute, second, frac);}
|
||||
public static DateAdp seg_(int[] ary) {
|
||||
int ary_len = ary.length;
|
||||
|
||||
66
100_core/src/gplx/Datetime_now.java
Normal file
66
100_core/src/gplx/Datetime_now.java
Normal file
@@ -0,0 +1,66 @@
|
||||
/*
|
||||
XOWA: the XOWA Offline Wiki Application
|
||||
Copyright (C) 2012 gnosygnu@gmail.com
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as
|
||||
published by the Free Software Foundation, either version 3 of the
|
||||
License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package gplx;
|
||||
import java.util.GregorianCalendar;
|
||||
public class Datetime_now {
|
||||
private static final DateAdp dflt = DateAdp_.parse_gplx("2001-01-01 00:00:00.000");
|
||||
private static DateAdp manual;
|
||||
private static boolean autoincrement = true;
|
||||
public static void Manual_y_() {
|
||||
manual = dflt;
|
||||
}
|
||||
public static void Manual_n_() {
|
||||
manual = null;
|
||||
autoincrement = true;
|
||||
}
|
||||
public static void Manual_and_freeze_(DateAdp v) {
|
||||
manual = v;
|
||||
autoincrement = false;
|
||||
}
|
||||
public static void Manual_(DateAdp v) {
|
||||
manual = v;
|
||||
}
|
||||
public static void Autoincrement_n_() {
|
||||
autoincrement = false;
|
||||
}
|
||||
public static DateAdp Dflt_add_min_(int v) {
|
||||
return dflt.Add_minute(v);
|
||||
}
|
||||
|
||||
public static DateAdp Get() {
|
||||
if (manual == null) return new DateAdp(new GregorianCalendar());
|
||||
DateAdp rv = manual;
|
||||
if (autoincrement) manual = rv.Add_minute(1); // simulate passage of manual by increasing manual by 1 minute with each call
|
||||
return rv;
|
||||
}
|
||||
// private static final DateAdp manual_time_dflt = DateAdp_.parse_gplx("2001-01-01 00:00:00.000");
|
||||
// private static DateAdp manual_time;
|
||||
// static boolean Now_enabled() {return now_enabled;} private static boolean now_enabled;
|
||||
// static void Now_enabled_y_() {now_enabled = Bool_.Y; manual_time = manual_time_dflt;}
|
||||
// static void Now_enabled_n_() {now_enabled = Bool_.N; now_freeze = false;}
|
||||
// public static void Now_set(DateAdp date) {now_enabled = true; manual_time = date;}
|
||||
// public static void Now_freeze_y_() {now_freeze = true;}
|
||||
// private static boolean now_freeze;
|
||||
// public static DateAdp Now_time0_add_min(int minutes) {return manual_time_dflt.Add_minute(minutes);}
|
||||
// @gplx.Internal protected static DateAdp Now() {
|
||||
// DateAdp rv = manual_time;
|
||||
// if (!now_freeze) manual_time = rv.Add_minute(1);
|
||||
// return rv;
|
||||
// }
|
||||
|
||||
}
|
||||
@@ -26,10 +26,10 @@ public class Gfo_log_ {
|
||||
}
|
||||
public static final String File__fmt = "yyyyMMdd_HHmmss", File__ext = ".log";
|
||||
public static Io_url New_url(Io_url dir) {
|
||||
return dir.GenSubFil(DateAdp_.Now().XtoUtc().XtoStr_fmt(Gfo_log_.File__fmt) + Gfo_log_.File__ext);
|
||||
return dir.GenSubFil(Datetime_now.Get().XtoUtc().XtoStr_fmt(Gfo_log_.File__fmt) + Gfo_log_.File__ext);
|
||||
}
|
||||
public static Gfo_log New_file(Io_url dir) {
|
||||
Io_url url = dir.GenSubFil(DateAdp_.Now().XtoStr_fmt(File__fmt) + File__ext);
|
||||
Io_url url = dir.GenSubFil(Datetime_now.Get().XtoStr_fmt(File__fmt) + File__ext);
|
||||
Gfo_log__file.Delete_old_files(dir, Gfo_log_.Instance);
|
||||
return new Gfo_log__file(url, new Gfo_log_itm_wtr__csv());
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ package gplx;
|
||||
public class Gfo_log_bfr {
|
||||
private Bry_bfr bfr = Bry_bfr_.Reset(255);
|
||||
public Gfo_log_bfr Add(String s) {
|
||||
bfr.Add_str_a7(DateAdp_.Now().XtoUtc().XtoStr_fmt_yyyyMMdd_HHmmss_fff());
|
||||
bfr.Add_str_a7(Datetime_now.Get().XtoUtc().XtoStr_fmt_yyyyMMdd_HHmmss_fff());
|
||||
bfr.Add_byte_space();
|
||||
bfr.Add_str_u8(s);
|
||||
bfr.Add_byte_nl();
|
||||
|
||||
@@ -21,7 +21,7 @@ public class Gfo_usr_dlg__log_base implements Gfo_usr_dlg__log {
|
||||
private int archive_dirs_max = 8;
|
||||
private Io_url log_dir, err_fil;
|
||||
private Ordered_hash queued_list = Ordered_hash_.New();
|
||||
private Bry_fmtr fmtr = Bry_fmtr.tmp_(); private Bry_bfr tmp_bfr = Bry_bfr_.Reset(255);
|
||||
private Bry_fmtr fmtr = Bry_fmtr.New__tmp(); private Bry_bfr tmp_bfr = Bry_bfr_.Reset(255);
|
||||
public boolean Queue_enabled() {return queue_enabled;} public void Queue_enabled_(boolean v) {queue_enabled = v; if (!v) this.Flush();} private boolean queue_enabled;
|
||||
public boolean Enabled() {return enabled;} public void Enabled_(boolean v) {enabled = v;} private boolean enabled = true;
|
||||
public Io_url Session_dir() {return session_dir;} private Io_url session_dir;
|
||||
@@ -56,7 +56,7 @@ public class Gfo_usr_dlg__log_base implements Gfo_usr_dlg__log {
|
||||
this.Log_to_session("app term");
|
||||
MoveCurrentToArchive(session_dir);
|
||||
}
|
||||
private void MoveCurrentToArchive(Io_url dir) {Io_mgr.Instance.MoveDirDeep(dir, dir.OwnerDir().GenSubDir(DateAdp_.Now().XtoStr_fmt_yyyyMMdd_HHmmss_fff()));}
|
||||
private void MoveCurrentToArchive(Io_url dir) {Io_mgr.Instance.MoveDirDeep(dir, dir.OwnerDir().GenSubDir(Datetime_now.Get().XtoStr_fmt_yyyyMMdd_HHmmss_fff()));}
|
||||
public void Log_info(boolean warn, String s) {if (warn) Log_to_err(s); else Log_to_session(s);}
|
||||
public void Log_msg_to_url_fmt(Io_url url, String fmt, Object... args) {
|
||||
if (!enabled) return;
|
||||
@@ -83,7 +83,7 @@ public class Gfo_usr_dlg__log_base implements Gfo_usr_dlg__log {
|
||||
}
|
||||
catch (Exception e) {Err_.Noop(e);} // java.lang.StringBuilder can throw exceptions in some situations when called on a different thread; ignore errors
|
||||
} private String_bldr sb = String_bldr_.new_thread(); // NOTE: use java.lang.StringBuffer to try to avoid random exceptions when called on a different thread
|
||||
private String Bld_msg(String s) {return sb.Add(DateAdp_.Now().XtoUtc().XtoStr_fmt_yyyyMMdd_HHmmss_fff()).Add(" ").Add(s).Add_char_nl().To_str_and_clear();}
|
||||
private String Bld_msg(String s) {return sb.Add(Datetime_now.Get().XtoUtc().XtoStr_fmt_yyyyMMdd_HHmmss_fff()).Add(" ").Add(s).Add_char_nl().To_str_and_clear();}
|
||||
private void Log_msg(Io_url url, String txt) {
|
||||
if (queue_enabled) {
|
||||
String url_raw = url == null ? "mem" : url.Raw();
|
||||
|
||||
@@ -19,7 +19,7 @@ package gplx;
|
||||
import gplx.core.brys.fmtrs.*;
|
||||
public class Gfo_usr_dlg_base implements Gfo_usr_dlg {
|
||||
private final Bry_bfr tmp_bfr = Bry_bfr_.Reset(255);
|
||||
private final Bry_fmtr tmp_fmtr = Bry_fmtr.tmp_().Fail_when_invalid_escapes_(false); // do not fail b/c msgs may contain excerpt of random text; EX:[[User:A|~A~]] DATE:2014-11-28
|
||||
private final Bry_fmtr tmp_fmtr = Bry_fmtr.New__tmp().Fail_when_invalid_escapes_(false); // do not fail b/c msgs may contain excerpt of random text; EX:[[User:A|~A~]] DATE:2014-11-28
|
||||
public Gfo_usr_dlg_base(Gfo_usr_dlg__log log_wkr, Gfo_usr_dlg__gui gui_wkr) {this.log_wkr = log_wkr; this.gui_wkr = gui_wkr;}
|
||||
public Gfo_usr_dlg__log Log_wkr() {return log_wkr;} public void Log_wkr_(Gfo_usr_dlg__log v) {log_wkr = v;} private Gfo_usr_dlg__log log_wkr;
|
||||
public Gfo_usr_dlg__gui Gui_wkr() {return gui_wkr;} public void Gui_wkr_(Gfo_usr_dlg__gui v) {gui_wkr = v;} private Gfo_usr_dlg__gui gui_wkr;
|
||||
|
||||
@@ -44,12 +44,12 @@ public class Hash_adp_bry extends gplx.core.lists.Hash_adp_base implements Hash_
|
||||
}
|
||||
public Object Get_by_bry(byte[] src) {synchronized (key_ref) {return super.Fetch_base(key_ref.Init(src));}} // TS: DATE:2016-07-06
|
||||
public Object Get_by_mid(byte[] src, int bgn, int end) {synchronized (key_ref) {return super.Fetch_base(key_ref.Init(src, bgn, end));}}// TS: DATE:2016-07-06
|
||||
public Hash_adp_bry Add_byte_int(byte key, int val) {this.Add_base(new byte[]{key}, Int_obj_val.new_(val)); return this;}
|
||||
public Hash_adp_bry Add_byte_int(byte key, int val) {this.Add_base(new byte[]{key}, new Int_obj_val(val)); return this;}
|
||||
public Hash_adp_bry Add_bry_byte(byte[] key, byte val) {this.Add_base(key, Byte_obj_val.new_(val)); return this;}
|
||||
public Hash_adp_bry Add_bry_int(byte[] key, int val) {this.Add_base(key, Int_obj_val.new_(val)); return this;}
|
||||
public Hash_adp_bry Add_bry_int(byte[] key, int val) {this.Add_base(key, new Int_obj_val(val)); return this;}
|
||||
public Hash_adp_bry Add_bry_bry(byte[] key) {this.Add_base(key, key); return this;}
|
||||
public Hash_adp_bry Add_str_byte(String key, byte val) {this.Add_base(Bry_.new_u8(key), Byte_obj_val.new_(val)); return this;}
|
||||
public Hash_adp_bry Add_str_int(String key, int val) {this.Add_base(Bry_.new_u8(key), Int_obj_val.new_(val)); return this;}
|
||||
public Hash_adp_bry Add_str_int(String key, int val) {this.Add_base(Bry_.new_u8(key), new Int_obj_val(val)); return this;}
|
||||
public Hash_adp_bry Add_str_obj(String key, Object val) {this.Add_base(Bry_.new_u8(key), val); return this;}
|
||||
public Hash_adp_bry Add_bry_obj(byte[] key, Object val) {this.Add_base(key, val); return this;}
|
||||
public Hash_adp_bry Add_many_str(String... ary) {
|
||||
|
||||
@@ -141,19 +141,6 @@ public class Tfds { // URL:doc/gplx.tfds/Tfds.txt
|
||||
static final String EmptyStr = TfdsMsgBldr.EmptyStr;
|
||||
static TfdsMsgBldr msgBldr = TfdsMsgBldr.new_();
|
||||
public static final Io_url RscDir = Io_url_.Usr().GenSubDir_nest("000", "200_dev", "190_tst");
|
||||
public static DateAdp Now_time0_add_min(int minutes) {return time0.Add_minute(minutes);}
|
||||
@gplx.Internal protected static boolean Now_enabled() {return now_enabled;} private static boolean now_enabled; private static boolean now_freeze;
|
||||
public static void Now_enabled_n_() {now_enabled = false; now_freeze = false;}
|
||||
public static void Now_set(DateAdp date) {now_enabled = true; nowTime = date;}
|
||||
public static void Now_enabled_y_() {now_enabled = true; nowTime = time0;}
|
||||
public static void Now_freeze_y_() {now_freeze = true;}
|
||||
@gplx.Internal protected static DateAdp Now() {
|
||||
DateAdp rv = nowTime;
|
||||
if (!now_freeze) nowTime = rv.Add_minute(1);
|
||||
return rv;
|
||||
}
|
||||
private static final DateAdp time0 = DateAdp_.parse_gplx("2001-01-01 00:00:00.000");
|
||||
private static DateAdp nowTime; // NOTE: cannot set to time0 due to static initialization;
|
||||
public static void WriteText(String text) {Console_adp__sys.Instance.Write_str(text);}
|
||||
public static void Write(byte[] s, int b, int e) {Write(Bry_.Mid(s, b, e));}
|
||||
public static void Write() {Write("tmp");}
|
||||
@@ -163,7 +150,7 @@ public class Tfds { // URL:doc/gplx.tfds/Tfds.txt
|
||||
int aryLen = Array_.Len(ary);
|
||||
for (int i = 0; i < aryLen; i++)
|
||||
sb.Add_many("'", Object_.Xto_str_strict_or_null_mark(ary[i]), "'", " ");
|
||||
WriteText(sb.To_str() + String_.CrLf);
|
||||
WriteText(sb.To_str() + String_.Lf);
|
||||
}
|
||||
}
|
||||
class TfdsEqListItmStr_cls_default implements TfdsEqListItmStr {
|
||||
|
||||
@@ -27,7 +27,7 @@ public class Bry_fmtr {
|
||||
else keys.Clear();
|
||||
int ary_len = ary.length;
|
||||
for (int i = 0; i < ary_len; i++)
|
||||
keys.Add(Bry_obj_ref.New(Bry_.new_u8(ary[i])), Int_obj_val.new_(i));
|
||||
keys.Add(Bry_obj_ref.New(Bry_.new_u8(ary[i])), new Int_obj_val(i));
|
||||
dirty = true;
|
||||
return this;
|
||||
} Hash_adp keys = null;
|
||||
@@ -232,7 +232,7 @@ public class Bry_fmtr {
|
||||
int baseInt = 0;
|
||||
public static final byte char_escape = Byte_ascii.Tilde, char_arg_bgn = Byte_ascii.Curly_bgn, char_arg_end = Byte_ascii.Curly_end, char_escape_nl = Byte_ascii.Ltr_n, char_escape_tab = Byte_ascii.Ltr_t, char_eval_bgn = Byte_ascii.Lt, char_eval_end = Byte_ascii.Gt;
|
||||
public static final Bry_fmtr Null = new Bry_fmtr().Fmt_("");
|
||||
public static Bry_fmtr tmp_() {return new Bry_fmtr().Fmt_("").Keys_();}
|
||||
public static Bry_fmtr New__tmp() {return new Bry_fmtr().Fmt_("").Keys_();}
|
||||
public static Bry_fmtr new_(String fmt, String... keys) {return new Bry_fmtr().Fmt_(fmt).Keys_(keys);} // NOTE: keys may seem redundant, but are needed to align ordinals with proc; EX: fmt may be "~{A} ~{B}" or "~{B} ~{A}"; call will always be Bld(a, b); passing in "A", "B" guarantees A is 0 and B is 1;
|
||||
public static Bry_fmtr new_(byte[] fmt, String... keys) {return new Bry_fmtr().Fmt_(fmt).Keys_(keys);} // NOTE: keys may seem redundant, but are needed to align ordinals with proc; EX: fmt may be "~{A} ~{B}" or "~{B} ~{A}"; call will always be Bld(a, b); passing in "A", "B" guarantees A is 0 and B is 1;
|
||||
public static Bry_fmtr new_() {return new Bry_fmtr();}
|
||||
|
||||
@@ -20,7 +20,7 @@ public class Bry_fmtr_eval_mgr_ {
|
||||
public static Io_url Eval_url(Bry_fmtr_eval_mgr eval_mgr, byte[] fmt) {
|
||||
if (eval_mgr == null) return Io_url_.new_any_(String_.new_u8(fmt));
|
||||
Bry_bfr bfr = Bry_bfr_.Reset(255);
|
||||
Bry_fmtr fmtr = Bry_fmtr.tmp_();
|
||||
Bry_fmtr fmtr = Bry_fmtr.New__tmp();
|
||||
fmtr.Eval_mgr_(eval_mgr).Fmt_(fmt).Bld_bfr_none(bfr);
|
||||
return Io_url_.new_any_(bfr.To_str_and_clear());
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
package gplx.core.brys.fmtrs; import gplx.*; import gplx.core.*; import gplx.core.brys.*;
|
||||
import gplx.core.brys.*;
|
||||
public class Bry_fmtr_vals implements Bfr_arg {
|
||||
private final Bry_fmtr fmtr; private Object[] vals;
|
||||
private final Bry_fmtr fmtr; private Object[] vals;
|
||||
Bry_fmtr_vals(Bry_fmtr fmtr) {this.fmtr = fmtr;}
|
||||
public Bry_fmtr_vals Vals_(Object... v) {this.vals = v; return this;}
|
||||
public void Bfr_arg__add(Bry_bfr bfr) {
|
||||
|
||||
@@ -88,9 +88,9 @@ public class Btrie_slim_mgr implements Btrie_mgr {
|
||||
return rv_obj == null ? or : ((Byte_obj_val)rv_obj).Val();
|
||||
}
|
||||
public Btrie_slim_mgr Add_bry_tid(byte[] bry, byte tid) {return (Btrie_slim_mgr)Add_obj(bry, Byte_obj_val.new_(tid));}
|
||||
public Btrie_slim_mgr Add_bry_int(byte[] key, int val) {return (Btrie_slim_mgr)Add_obj(key, Int_obj_val.new_(val));}
|
||||
public Btrie_slim_mgr Add_bry_int(byte[] key, int val) {return (Btrie_slim_mgr)Add_obj(key, new Int_obj_val(val));}
|
||||
public Btrie_slim_mgr Add_str_byte(String key, byte val) {return (Btrie_slim_mgr)Add_obj(Bry_.new_u8(key), Byte_obj_val.new_(val));}
|
||||
public Btrie_slim_mgr Add_str_int(String key, int val) {return (Btrie_slim_mgr)Add_obj(Bry_.new_u8(key), Int_obj_val.new_(val));}
|
||||
public Btrie_slim_mgr Add_str_int(String key, int val) {return (Btrie_slim_mgr)Add_obj(Bry_.new_u8(key), new Int_obj_val(val));}
|
||||
public Btrie_slim_mgr Add_bry(String key, String val) {return (Btrie_slim_mgr)Add_obj(Bry_.new_u8(key), Bry_.new_u8(val));}
|
||||
public Btrie_slim_mgr Add_bry(String key, byte[] val) {return (Btrie_slim_mgr)Add_obj(Bry_.new_u8(key), val);}
|
||||
public Btrie_slim_mgr Add_bry(byte[] v) {return (Btrie_slim_mgr)Add_obj(v, v);}
|
||||
@@ -108,7 +108,7 @@ public class Btrie_slim_mgr implements Btrie_mgr {
|
||||
public Btrie_slim_mgr Add_many_int(int val, String... ary) {return Add_many_int(val, Bry_.Ary(ary));}
|
||||
public Btrie_slim_mgr Add_many_int(int val, byte[]... ary) {
|
||||
int len = ary.length;
|
||||
Int_obj_val obj = Int_obj_val.new_(val);
|
||||
Int_obj_val obj = new Int_obj_val(val);
|
||||
for (int i = 0; i < len; i++)
|
||||
Add_obj(ary[i], obj);
|
||||
return this;
|
||||
|
||||
@@ -68,7 +68,7 @@ public class IoEngine_memory extends IoEngine_base {
|
||||
return FetchFil(args.Url()).Text();
|
||||
}
|
||||
void SaveFilStr(Io_url url, String text) {
|
||||
DateAdp time = DateAdp_.Now();
|
||||
DateAdp time = Datetime_now.Get();
|
||||
IoItmFil_mem fil = IoItmFil_mem.new_(url, String_.Len(text), time, text);
|
||||
AddFilToDir(url.OwnerDir(), fil);
|
||||
}
|
||||
@@ -76,7 +76,7 @@ public class IoEngine_memory extends IoEngine_base {
|
||||
Io_url url = args.Url(); String text = args.Text();
|
||||
if (ExistsFil_api(url)) {
|
||||
IoItmFil_mem fil = FetchFil(url);
|
||||
fil.ModifiedTime_(DateAdp_.Now());
|
||||
fil.ModifiedTime_(Datetime_now.Get());
|
||||
fil.Text_set(fil.Text() + text);
|
||||
}
|
||||
else
|
||||
|
||||
@@ -48,7 +48,7 @@ public class IoEngine_xrg_recycleFil extends IoEngine_xrg_fil_affects1_base {
|
||||
}
|
||||
public IoEngine_xrg_recycleFil(int v) {
|
||||
mode = v;
|
||||
time = DateAdp_.Now();
|
||||
time = Datetime_now.Get();
|
||||
uuid = Guid_adp_.New();
|
||||
rootDirNames = List_adp_.New(); rootDirNames.Add("z_trash");
|
||||
}
|
||||
|
||||
@@ -17,16 +17,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package gplx.core.primitives; import gplx.*; import gplx.core.*;
|
||||
public class Int_obj_val implements CompareAble {
|
||||
public int Val() {return val;} int val;
|
||||
public Int_obj_val(int val) {this.val = val;}
|
||||
public int Val() {return val;} private final int val;
|
||||
@Override public String toString() {return Int_.To_str(val);}
|
||||
@Override public int hashCode() {return val;}
|
||||
@Override public boolean equals(Object obj) {return obj == null ? false : val == ((Int_obj_val)obj).Val();}
|
||||
public int compareTo(Object obj) {Int_obj_val comp = (Int_obj_val)obj; return Int_.Compare(val, comp.val);}
|
||||
public static Int_obj_val neg1_() {return new_(-1);}
|
||||
public static Int_obj_val zero_() {return new_(0);}
|
||||
public static Int_obj_val new_(int val) {
|
||||
Int_obj_val rv = new Int_obj_val();
|
||||
rv.val = val;
|
||||
return rv;
|
||||
} Int_obj_val() {}
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@ public class PerfLogMgr_fxt {
|
||||
public void Init(Io_url url, String text) {
|
||||
this.url = url;
|
||||
entries.Resize_bounds(1000);
|
||||
entries.Add(new PerfLogItm(0, text + "|" + DateAdp_.Now().XtoStr_gplx()));
|
||||
entries.Add(new PerfLogItm(0, text + "|" + Datetime_now.Get().XtoStr_gplx()));
|
||||
tmr.Bgn();
|
||||
}
|
||||
public void Write(String text) {
|
||||
|
||||
@@ -21,7 +21,7 @@ public class Gfs_Date_tst {
|
||||
@Before public void setup() {
|
||||
fx = new GfsCoreFxt();
|
||||
fx.AddObj(DateAdp_.Gfs, "Date_");
|
||||
Tfds.Now_enabled_y_();
|
||||
Datetime_now.Manual_y_();
|
||||
} GfsCoreFxt fx;
|
||||
@Test public void Now() {
|
||||
fx.tst_MsgStr(fx.msg_(String_.Ary("Date_", "Now")), DateAdp_.parse_gplx("2001-01-01 00:00:00.000"));
|
||||
|
||||
Reference in New Issue
Block a user