我正在写打字稿,遇到一个问题:
例如,有一种方法可能会引发错误:
public void insertContent(Content content) {
long now = System.currentTimeMillis();
content.setDate_of_creation(now);
content.setLast_edited(now);
Log.d(TAG, "insertContent: now is: " + now);
Log.d(TAG, "insertContent: last edited is: " + content.getLast_edited());
insert(content);
}
期望
D/AbstractContentDao: insertContent: now is: 1594955583706
D/AbstractContentDao: insertContent: last edited is: 1594955583706
D/FolderTotalUpdaterView: onChanged: content is: com.example.flyhigh.data.pojos_entities.content.Content@15f56a
D/FolderTotalUpdaterView: observeForever: antiSpammingBoolean is: true
D/FolderTotalUpdaterView: observeForever: now is: 1594955583722
D/FolderTotalUpdaterView: observeForever: lastEdited is: 1594949549895
E/FolderTotalUpdaterView: observeForever: content was created way before 1000 ms
也许需要护送?